diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-12-31 07:50:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:00:23 -0500 |
commit | 4828e7f49a402930e8b3e72de695c8d37e0f98ee (patch) | |
tree | 021c5d357b8a081bee8b8798e362b37999ee1ffb /net/ipv4 | |
parent | cadbd0313bc897f5917d013174cdf9077edf4aa5 (diff) |
[TCP]: Remove TCPCB_URG & TCPCB_AT_TAIL as unnecessary
The snd_up check should be enough. I suspect this has been
there to provide a minor optimization in clean_rtx_queue which
used to have a small if (!->sacked) block which could skip
snd_up check among the other work.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp.c | 1 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 7 |
3 files changed, 4 insertions, 7 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 2cbfa6df7976..34085e3a4096 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -497,7 +497,6 @@ static inline void tcp_mark_urg(struct tcp_sock *tp, int flags, | |||
497 | if (flags & MSG_OOB) { | 497 | if (flags & MSG_OOB) { |
498 | tp->urg_mode = 1; | 498 | tp->urg_mode = 1; |
499 | tp->snd_up = tp->write_seq; | 499 | tp->snd_up = tp->write_seq; |
500 | TCP_SKB_CB(skb)->sacked |= TCPCB_URG; | ||
501 | } | 500 | } |
502 | } | 501 | } |
503 | 502 | ||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7bac1fac065f..1e7fd8113663 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2821,8 +2821,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets) | |||
2821 | if (sacked & TCPCB_LOST) | 2821 | if (sacked & TCPCB_LOST) |
2822 | tp->lost_out -= acked_pcount; | 2822 | tp->lost_out -= acked_pcount; |
2823 | 2823 | ||
2824 | if (unlikely((sacked & TCPCB_URG) && tp->urg_mode && | 2824 | if (unlikely(tp->urg_mode && !before(end_seq, tp->snd_up))) |
2825 | !before(end_seq, tp->snd_up))) | ||
2826 | tp->urg_mode = 0; | 2825 | tp->urg_mode = 0; |
2827 | 2826 | ||
2828 | tp->packets_out -= acked_pcount; | 2827 | tp->packets_out -= acked_pcount; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 821fae271428..cd21528665f3 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -711,7 +711,6 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss | |||
711 | TCP_SKB_CB(skb)->flags = flags & ~(TCPCB_FLAG_FIN|TCPCB_FLAG_PSH); | 711 | TCP_SKB_CB(skb)->flags = flags & ~(TCPCB_FLAG_FIN|TCPCB_FLAG_PSH); |
712 | TCP_SKB_CB(buff)->flags = flags; | 712 | TCP_SKB_CB(buff)->flags = flags; |
713 | TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked; | 713 | TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked; |
714 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_AT_TAIL; | ||
715 | 714 | ||
716 | if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_PARTIAL) { | 715 | if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_PARTIAL) { |
717 | /* Copy and checksum data tail into the new buffer. */ | 716 | /* Copy and checksum data tail into the new buffer. */ |
@@ -1726,7 +1725,7 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m | |||
1726 | /* All done, get rid of second SKB and account for it so | 1725 | /* All done, get rid of second SKB and account for it so |
1727 | * packet counting does not break. | 1726 | * packet counting does not break. |
1728 | */ | 1727 | */ |
1729 | TCP_SKB_CB(skb)->sacked |= TCP_SKB_CB(next_skb)->sacked&(TCPCB_EVER_RETRANS|TCPCB_AT_TAIL); | 1728 | TCP_SKB_CB(skb)->sacked |= TCP_SKB_CB(next_skb)->sacked & TCPCB_EVER_RETRANS; |
1730 | if (TCP_SKB_CB(next_skb)->sacked&TCPCB_SACKED_RETRANS) | 1729 | if (TCP_SKB_CB(next_skb)->sacked&TCPCB_SACKED_RETRANS) |
1731 | tp->retrans_out -= tcp_skb_pcount(next_skb); | 1730 | tp->retrans_out -= tcp_skb_pcount(next_skb); |
1732 | if (TCP_SKB_CB(next_skb)->sacked&TCPCB_LOST) | 1731 | if (TCP_SKB_CB(next_skb)->sacked&TCPCB_LOST) |
@@ -2475,7 +2474,7 @@ static int tcp_xmit_probe_skb(struct sock *sk, int urgent) | |||
2475 | skb_reserve(skb, MAX_TCP_HEADER); | 2474 | skb_reserve(skb, MAX_TCP_HEADER); |
2476 | skb->csum = 0; | 2475 | skb->csum = 0; |
2477 | TCP_SKB_CB(skb)->flags = TCPCB_FLAG_ACK; | 2476 | TCP_SKB_CB(skb)->flags = TCPCB_FLAG_ACK; |
2478 | TCP_SKB_CB(skb)->sacked = urgent; | 2477 | TCP_SKB_CB(skb)->sacked = 0; |
2479 | skb_shinfo(skb)->gso_segs = 1; | 2478 | skb_shinfo(skb)->gso_segs = 1; |
2480 | skb_shinfo(skb)->gso_size = 0; | 2479 | skb_shinfo(skb)->gso_size = 0; |
2481 | skb_shinfo(skb)->gso_type = 0; | 2480 | skb_shinfo(skb)->gso_type = 0; |
@@ -2527,7 +2526,7 @@ int tcp_write_wakeup(struct sock *sk) | |||
2527 | } else { | 2526 | } else { |
2528 | if (tp->urg_mode && | 2527 | if (tp->urg_mode && |
2529 | between(tp->snd_up, tp->snd_una+1, tp->snd_una+0xFFFF)) | 2528 | between(tp->snd_up, tp->snd_una+1, tp->snd_una+0xFFFF)) |
2530 | tcp_xmit_probe_skb(sk, TCPCB_URG); | 2529 | tcp_xmit_probe_skb(sk, 1); |
2531 | return tcp_xmit_probe_skb(sk, 0); | 2530 | return tcp_xmit_probe_skb(sk, 0); |
2532 | } | 2531 | } |
2533 | } | 2532 | } |