aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2013-12-30 14:37:15 -0500
committerDan Williams <dan.j.williams@intel.com>2014-09-28 10:22:21 -0400
commitd27f9bc104375a0a835cf68bb88fc9cec69125da (patch)
tree677551c2d965b28fbba400d9981dfaa766a1249b /net/ipv4/tcp_input.c
parent7bced397510ab569d31de4c70b39e13355046387 (diff)
net_dma: revert 'copied_early'
Now that tcp_dma_try_early_copy() is gone nothing ever sets copied_early. Also reverts "53240c208776 tcp: Fix possible double-ack w/ user dma" since it is no longer necessary. Cc: Ali Saidi <saidi@engin.umich.edu> Cc: James Morris <jmorris@namei.org> Cc: Patrick McHardy <kaber@trash.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Neal Cardwell <ncardwell@google.com> Reported-by: Dave Jones <davej@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 1342e9851f97..1da0ade98236 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5148,19 +5148,15 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
5148 } 5148 }
5149 } else { 5149 } else {
5150 int eaten = 0; 5150 int eaten = 0;
5151 int copied_early = 0;
5152 bool fragstolen = false; 5151 bool fragstolen = false;
5153 5152
5154 if (tp->copied_seq == tp->rcv_nxt && 5153 if (tp->ucopy.task == current &&
5155 len - tcp_header_len <= tp->ucopy.len) { 5154 tp->copied_seq == tp->rcv_nxt &&
5156 if (tp->ucopy.task == current && 5155 len - tcp_header_len <= tp->ucopy.len &&
5157 sock_owned_by_user(sk) && !copied_early) { 5156 sock_owned_by_user(sk)) {
5158 __set_current_state(TASK_RUNNING); 5157 __set_current_state(TASK_RUNNING);
5159 5158
5160 if (!tcp_copy_to_iovec(sk, skb, tcp_header_len)) 5159 if (!tcp_copy_to_iovec(sk, skb, tcp_header_len)) {
5161 eaten = 1;
5162 }
5163 if (eaten) {
5164 /* Predicted packet is in window by definition. 5160 /* Predicted packet is in window by definition.
5165 * seq == rcv_nxt and rcv_wup <= rcv_nxt. 5161 * seq == rcv_nxt and rcv_wup <= rcv_nxt.
5166 * Hence, check seq<=rcv_wup reduces to: 5162 * Hence, check seq<=rcv_wup reduces to:
@@ -5176,9 +5172,8 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
5176 __skb_pull(skb, tcp_header_len); 5172 __skb_pull(skb, tcp_header_len);
5177 tp->rcv_nxt = TCP_SKB_CB(skb)->end_seq; 5173 tp->rcv_nxt = TCP_SKB_CB(skb)->end_seq;
5178 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPHPHITSTOUSER); 5174 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPHPHITSTOUSER);
5175 eaten = 1;
5179 } 5176 }
5180 if (copied_early)
5181 tcp_cleanup_rbuf(sk, skb->len);
5182 } 5177 }
5183 if (!eaten) { 5178 if (!eaten) {
5184 if (tcp_checksum_complete_user(sk, skb)) 5179 if (tcp_checksum_complete_user(sk, skb))
@@ -5215,8 +5210,7 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
5215 goto no_ack; 5210 goto no_ack;
5216 } 5211 }
5217 5212
5218 if (!copied_early || tp->rcv_nxt != tp->rcv_wup) 5213 __tcp_ack_snd_check(sk, 0);
5219 __tcp_ack_snd_check(sk, 0);
5220no_ack: 5214no_ack:
5221 if (eaten) 5215 if (eaten)
5222 kfree_skb_partial(skb, fragstolen); 5216 kfree_skb_partial(skb, fragstolen);