netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Toshiaki Makita <toshiaki.makita1@gmail.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>
Subject: [PATCH net-next 0/4] veth: allow GRO even without XDP
Date: Fri,  9 Apr 2021 13:04:36 +0200	[thread overview]
Message-ID: <cover.1617965243.git.pabeni@redhat.com> (raw)

This series allows the user-space to enable GRO/NAPI on a veth
device even without attaching an XDP program.

It does not change the default veth behavior (no NAPI, no GRO),
except that the GRO feature bit on top of this series will be
effectively off by default on veth devices. Note that currently
the GRO bit is on by default, but GRO never takes place in
absence of XDP.

On top of this series, setting the GRO feature bit enables NAPI
and allows the GRO to take place. The TSO features on the peer
device are preserved.

The main goal is improving UDP forwarding performances for
containers in a typical virtual network setup:

(container) veth -> veth peer -> bridge/ovs -> vxlan -> NIC

Enabling the NAPI threaded mode, GRO the NETIF_F_GRO_UDP_FWD
feature on the veth peer improves the UDP stream performance
with not void netfilter configuration by 2x factor with no
measurable overhead for TCP traffic: some heuristic ensures
that TCP will not go through the additional NAPI/GRO layer.

Some self-tests are added to check the expected behavior in
the default configuration, with XDP and with plain GRO enabled.

Paolo Abeni (4):
  veth: use skb_orphan_partial instead of skb_orphan
  veth: allow enabling NAPI even without XDP
  veth: refine napi usage
  self-tests: add veth tests

 drivers/net/veth.c                   | 152 ++++++++++++++++++++---
 tools/testing/selftests/net/Makefile |   1 +
 tools/testing/selftests/net/veth.sh  | 177 +++++++++++++++++++++++++++
 3 files changed, 316 insertions(+), 14 deletions(-)
 create mode 100755 tools/testing/selftests/net/veth.sh

-- 
2.26.2


             reply	other threads:[~2021-04-09 11:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 11:04 Paolo Abeni [this message]
2021-04-09 11:04 ` [PATCH net-next 1/4] veth: use skb_orphan_partial instead of skb_orphan Paolo Abeni
2021-04-09 11:04 ` [PATCH net-next 2/4] veth: allow enabling NAPI even without XDP Paolo Abeni
2021-04-09 14:58   ` Toke Høiland-Jørgensen
2021-04-09 15:20     ` Paolo Abeni
2021-04-16 15:29       ` Toke Høiland-Jørgensen
2021-04-16 17:26         ` Paolo Abeni
2021-04-16 18:19           ` Toke Høiland-Jørgensen
2021-04-09 11:04 ` [PATCH net-next 3/4] veth: refine napi usage Paolo Abeni
2021-04-09 14:57   ` Toke Høiland-Jørgensen
2021-04-09 15:07     ` Paolo Abeni
2021-04-09 15:18       ` Toke Høiland-Jørgensen
2021-04-09 11:04 ` [PATCH net-next 4/4] self-tests: add veth tests Paolo Abeni
2021-04-12  0:10 ` [PATCH net-next 0/4] veth: allow GRO even without XDP patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1617965243.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=toshiaki.makita1@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).