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)
committerColin Cross <ccross@android.com>
Tue, 14 Jun 2011 16:09:56 +0000 (09:09 -0700)
commit9be0c37a063b657a82df718234ecfbc13307bc9b
tree6adacbf883eb429236fedc712ef5f094e6ca5afc
parent810bf5db1e7aa71994907e71d05abc6cd6a6f482
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/pppolac.c
drivers/net/pppopns.c
include/linux/if_pppox.h