aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChia-chi Yeh <chiachi@android.com>2011-04-15 15:22:09 -0700
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-11-05 11:44:43 -0800
commit75863968e417c342015e384dcbe4b454216bedd9 (patch)
treeb9098e4c37838eb6d166bb7086adfc372935b4d3 /include
parent6d2b98c6a9aa7120c9172e7ef557de9ba0e1b962 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_pppox.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index bc4f57df265b..dccd621d6377 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -43,19 +43,21 @@ struct pptp_opt {
};
struct pppolac_opt {
- __u32 local;
- __u32 remote;
- __u16 sequence;
- __u8 sequencing;
- int (*backlog_rcv)(struct sock *sk_udp, struct sk_buff *skb);
+ __u32 local;
+ __u32 remote;
+ __u32 recv_sequence;
+ __u32 xmit_sequence;
+ atomic_t sequencing;
+ int (*backlog_rcv)(struct sock *sk_udp, struct sk_buff *skb);
};
struct pppopns_opt {
- __u16 local;
- __u16 remote;
- __u32 sequence;
- void (*data_ready)(struct sock *sk_raw, int length);
- int (*backlog_rcv)(struct sock *sk_raw, struct sk_buff *skb);
+ __u16 local;
+ __u16 remote;
+ __u32 recv_sequence;
+ __u32 xmit_sequence;
+ void (*data_ready)(struct sock *sk_raw, int length);
+ int (*backlog_rcv)(struct sock *sk_raw, struct sk_buff *skb);
};
#include <net/sock.h>