]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
tcp: push full zerocopy packets
authorWillem de Bruijn <willemb@google.com>
Sat, 23 Dec 2017 00:00:18 +0000 (19:00 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Dec 2017 21:44:13 +0000 (16:44 -0500)
Skbs that reach MAX_SKB_FRAGS cannot be extended further. Do the
same for zerocopy frags as non-zerocopy frags and set the PSH bit.
This improves GRO assembly.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c

index 67d39b79c8016c6bb0224a6987ed960be399dcba..44102484a76f69ae3eef96cfdf29b52bb348314b 100644 (file)
@@ -1371,8 +1371,10 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
                        pfrag->offset += copy;
                } else {
                        err = skb_zerocopy_iter_stream(sk, skb, msg, copy, uarg);
-                       if (err == -EMSGSIZE || err == -EEXIST)
+                       if (err == -EMSGSIZE || err == -EEXIST) {
+                               tcp_mark_push(tp, skb);
                                goto new_segment;
+                       }
                        if (err < 0)
                                goto do_error;
                        copy = err;