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)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 20:40:31 +0000 (13:40 -0700)
commit4974de8b5da8c91bfba253a3ac663db30c7f3ad5
tree367d4239916d0a0ff17a357e850ba9ab5cbd0731
parent32d3498d047d71b706e7a55803203a969cc2bacf
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