From mboxrd@z Thu Jan 1 00:00:00 1970 From: Willem de Bruijn Subject: [PATCH net-next v3 0/3] udp msg_zerocopy Date: Thu, 29 Nov 2018 15:26:17 -0500 Message-ID: <20181129202620.233237-1-willemdebruijn.kernel@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: davem@davemloft.net, pabeni@redhat.com, Willem de Bruijn To: netdev@vger.kernel.org Return-path: Received: from mail-qt1-f193.google.com ([209.85.160.193]:41401 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbeK3HdD (ORCPT ); Fri, 30 Nov 2018 02:33:03 -0500 Received: by mail-qt1-f193.google.com with SMTP id d18so3517495qto.8 for ; Thu, 29 Nov 2018 12:26:24 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: From: Willem de Bruijn Enable MSG_ZEROCOPY for udp sockets Patch 1/3 is the main patch, a rework of RFC patch http://patchwork.ozlabs.org/patch/899630/ more details in the patch commit message Patch 2/3 is an optimization to remove a branch from the UDP hot path and refcount_inc/refcount_dec_and_test pair when zerocopy is used. This used to be included in the first patch in v2. Patch 3/3 runs the already existing udp zerocopy tests as part of kselftest See also recent Linux Plumbers presentation https://linuxplumbersconf.org/event/2/contributions/106/attachments/104/128/willemdebruijn-lpc2018-udpgso-presentation-20181113.pdf Changes: v1 -> v2 - Fixup reverse christmas tree violation v2 -> v3 - Split refcount avoidance optimization into separate patch - Fix refcount leak on error in fragmented case (thanks to Paolo Abeni for pointing this one out!) - Fix refcount inc on zero Willem de Bruijn (3): udp: msg_zerocopy udp: elide zerocopy operation in hot path selftests: extend zerocopy tests to udp include/linux/skbuff.h | 13 +++++++---- net/core/skbuff.c | 15 +++++++++---- net/core/sock.c | 5 ++++- net/ipv4/ip_output.c | 25 +++++++++++++++++++-- net/ipv4/tcp.c | 2 +- net/ipv6/ip6_output.c | 25 +++++++++++++++++++-- tools/testing/selftests/net/msg_zerocopy.c | 3 ++- tools/testing/selftests/net/msg_zerocopy.sh | 2 ++ tools/testing/selftests/net/udpgso_bench.sh | 3 +++ 9 files changed, 78 insertions(+), 15 deletions(-) -- 2.20.0.rc0.387.gc7a69e6b6c-goog