net: Reorder incoming packets in PPPoLAC and PPPoPNS.
authorChia-chi Yeh <chiachi@android.com>
Fri, 15 Apr 2011 22:22:09 +0000 (15:22 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:51:19 +0000 (13:51 -0800)
commit02649604a0ec84e1a9ead0f6742e0f458aa70a0c
tree01a37a32bc541eda0ffa87ec89f64e762bc5f528
parent3014a5d3ebb9a2369405350d5ea611c755eab1e7
net: Reorder incoming packets in PPPoLAC and PPPoPNS.

PPP handles packet loss but does not work with out of order packets.
This change performs reordering of incoming data packets within a
sliding window of one second. Since sequence number is optional,
receiving a packet without it will drop all queued packets.

Currently the logic is triggered by incoming packets, so queued
packets have to wait till another packet is arrived. It is done for
simplicity since no additional locks or threads are required. For
reliable protocols, a retransmission will kick it. For unreliable
protocols, queued packets just seem like packet loss. Time-critical
protocols might be broken, but they never work with queueing anyway.

Signed-off-by: Chia-chi Yeh <chiachi@android.com>
drivers/net/ppp/pppolac.c
drivers/net/ppp/pppopns.c
include/linux/if_pppox.h