From: Willem de Bruijn Subject: [PATCH net-next 2/4] tcp: push full zerocopy packets Date: Fri, 22 Dec 2017 19:00:18 -0500 Message-ID: <20171223000020.55509-3-willemdebruijn.kernel@gmail.com> References: <20171223000020.55509-1-willemdebruijn.kernel@gmail.com> Cc: davem@davemloft.net, Willem de Bruijn To: netdev@vger.kernel.org Return-path: Received: from mail-yw0-f196.google.com ([209.85.161.196]:45727 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756868AbdLWAA0 (ORCPT ); Fri, 22 Dec 2017 19:00:26 -0500 Received: by mail-yw0-f196.google.com with SMTP id y187so4634595ywd.12 for ; Fri, 22 Dec 2017 16:00:25 -0800 (PST) In-Reply-To: <20171223000020.55509-1-willemdebruijn.kernel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Willem de Bruijn 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 Signed-off-by: Willem de Bruijn --- net/ipv4/tcp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 67d39b79c801..44102484a76f 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -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; -- 2.15.1.620.gb9897f4670-goog