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)
committerChia-chi Yeh <chiachi@android.com>
Wed, 20 Apr 2011 00:01:55 +0000 (17:01 -0700)
commit0d48e31fcc17a91dcffb2f43c18c7ca1761abb98
treecd30831a7f2036c37e76f41a3b3727d8f51eda9a
parent1dbf78b64cbc102b943df2335ff83d2bef654b99
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