diff options
author | Gilad Ben-Yossef <gilad@codefidence.com> | 2009-10-28 00:15:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-29 04:28:48 -0400 |
commit | dc343475ed062e13fc260acccaab91d7d80fd5b2 (patch) | |
tree | a7bf4c52a5a65e579b397000624f416294777a96 /net/ipv4/tcp_input.c | |
parent | 345cda2fd695534be5a4494f1b59da9daed33663 (diff) |
Allow disabling of DSACK TCP option per route
Add and use no DSCAK bit in the features field.
Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 393c56921dcb..ba0eab65fe80 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4080,8 +4080,10 @@ static inline int tcp_sack_extend(struct tcp_sack_block *sp, u32 seq, | |||
4080 | static void tcp_dsack_set(struct sock *sk, u32 seq, u32 end_seq) | 4080 | static void tcp_dsack_set(struct sock *sk, u32 seq, u32 end_seq) |
4081 | { | 4081 | { |
4082 | struct tcp_sock *tp = tcp_sk(sk); | 4082 | struct tcp_sock *tp = tcp_sk(sk); |
4083 | struct dst_entry *dst = __sk_dst_get(sk); | ||
4083 | 4084 | ||
4084 | if (tcp_is_sack(tp) && sysctl_tcp_dsack) { | 4085 | if (tcp_is_sack(tp) && sysctl_tcp_dsack && |
4086 | !dst_feature(dst, RTAX_FEATURE_NO_DSACK)) { | ||
4085 | int mib_idx; | 4087 | int mib_idx; |
4086 | 4088 | ||
4087 | if (before(seq, tp->rcv_nxt)) | 4089 | if (before(seq, tp->rcv_nxt)) |
@@ -4110,13 +4112,15 @@ static void tcp_dsack_extend(struct sock *sk, u32 seq, u32 end_seq) | |||
4110 | static void tcp_send_dupack(struct sock *sk, struct sk_buff *skb) | 4112 | static void tcp_send_dupack(struct sock *sk, struct sk_buff *skb) |
4111 | { | 4113 | { |
4112 | struct tcp_sock *tp = tcp_sk(sk); | 4114 | struct tcp_sock *tp = tcp_sk(sk); |
4115 | struct dst_entry *dst = __sk_dst_get(sk); | ||
4113 | 4116 | ||
4114 | if (TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq && | 4117 | if (TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq && |
4115 | before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) { | 4118 | before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) { |
4116 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_DELAYEDACKLOST); | 4119 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_DELAYEDACKLOST); |
4117 | tcp_enter_quickack_mode(sk); | 4120 | tcp_enter_quickack_mode(sk); |
4118 | 4121 | ||
4119 | if (tcp_is_sack(tp) && sysctl_tcp_dsack) { | 4122 | if (tcp_is_sack(tp) && sysctl_tcp_dsack && |
4123 | !dst_feature(dst, RTAX_FEATURE_NO_DSACK)) { | ||
4120 | u32 end_seq = TCP_SKB_CB(skb)->end_seq; | 4124 | u32 end_seq = TCP_SKB_CB(skb)->end_seq; |
4121 | 4125 | ||
4122 | if (after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) | 4126 | if (after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) |