diff options
author | James Chapman <jchapman@katalix.com> | 2013-07-02 15:29:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-02 19:33:25 -0400 |
commit | a0dbd822273ce7660bf35525d61d7a8ac5e679a3 (patch) | |
tree | 3f5187519c078bfa265654239854ab0a41597719 /net/l2tp/l2tp_core.h | |
parent | 8a1631d588a39e826f4248e60310498d5266c6fa (diff) |
l2tp: make datapath resilient to packet loss when sequence numbers enabled
If L2TP data sequence numbers are enabled and reordering is not
enabled, data reception stops if a packet is lost since the kernel
waits for a sequence number that is never resent. (When reordering is
enabled, data reception restarts when the reorder timeout expires.) If
no reorder timeout is set, we should count the number of in-sequence
packets after the out-of-sequence (OOS) condition is detected, and reset
sequence number state after a number of such packets are received.
For now, the number of in-sequence packets while in OOS state which
cause the sequence number state to be reset is hard-coded to 5. This
could be configurable later.
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_core.h')
-rw-r--r-- | net/l2tp/l2tp_core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/l2tp/l2tp_core.h b/net/l2tp/l2tp_core.h index 4b9a3b724423..66a559b104b6 100644 --- a/net/l2tp/l2tp_core.h +++ b/net/l2tp/l2tp_core.h | |||
@@ -104,6 +104,9 @@ struct l2tp_session { | |||
104 | struct sk_buff_head reorder_q; /* receive reorder queue */ | 104 | struct sk_buff_head reorder_q; /* receive reorder queue */ |
105 | u32 nr_max; /* max NR. Depends on tunnel */ | 105 | u32 nr_max; /* max NR. Depends on tunnel */ |
106 | u32 nr_window_size; /* NR window size */ | 106 | u32 nr_window_size; /* NR window size */ |
107 | u32 nr_oos; /* NR of last OOS packet */ | ||
108 | int nr_oos_count; /* For OOS recovery */ | ||
109 | int nr_oos_count_max; | ||
107 | struct hlist_node hlist; /* Hash list node */ | 110 | struct hlist_node hlist; /* Hash list node */ |
108 | atomic_t ref_count; | 111 | atomic_t ref_count; |
109 | 112 | ||