From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
"Jason Wang" <jasowang@redhat.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Yuri Benditovich" <yuri.benditovich@daynix.com>,
"Akihiko Odaki" <akihiko.odaki@daynix.com>,
"Jonathan Corbet" <corbet@lwn.net>,
kvm@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v7 net-next 0/9] virtio: introduce GSO over UDP tunnel
Date: Tue, 8 Jul 2025 11:01:30 -0400 [thread overview]
Message-ID: <20250708105816-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <cover.1751874094.git.pabeni@redhat.com>
On Tue, Jul 08, 2025 at 09:08:56AM +0200, Paolo Abeni wrote:
> Some virtualized deployments use UDP tunnel pervasively and are impacted
> negatively by the lack of GSO support for such kind of traffic in the
> virtual NIC driver.
>
> The virtio_net specification recently introduced support for GSO over
> UDP tunnel, this series updates the virtio implementation to support
> such a feature.
>
> Currently the kernel virtio support limits the feature space to 64,
> while the virtio specification allows for a larger number of features.
> Specifically the GSO-over-UDP-tunnel-related virtio features use bits
> 65-69.
>
> The first four patches in this series rework the virtio and vhost
> feature support to cope with up to 128 bits. The limit is set by
> a define and could be easily raised in future, as needed.
>
> This implementation choice is aimed at keeping the code churn as
> limited as possible. For the same reason, only the virtio_net driver is
> reworked to leverage the extended feature space; all other
> virtio/vhost drivers are unaffected, but could be upgraded to support
> the extended features space in a later time.
>
> The last four patches bring in the actual GSO over UDP tunnel support.
> As per specification, some additional fields are introduced into the
> virtio net header to support the new offload. The presence of such
> fields depends on the negotiated features.
>
> New helpers are introduced to convert the UDP-tunneled skb metadata to
> an extended virtio net header and vice versa. Such helpers are used by
> the tun and virtio_net driver to cope with the newly supported offloads.
>
> Tested with basic stream transfer with all the possible permutations of
> host kernel/qemu/guest kernel with/without GSO over UDP tunnel support.
> ---
> WRT the merge plan, this is also are available in the Git repository at
> [1]:
>
> git@github.com:pabeni/linux-devel.git virtio_udp_tunnel_07_07_2025
>
> The first 5 patches in this series, that is, the virtio features
> extension bits are also available at [2]:
>
> git@github.com:pabeni/linux-devel.git virtio_features_extension_07_07_2025
>
> Ideally the virtio features extension bit should go via the virtio tree
> and the virtio_net/tun patches via the net-next tree. The latter have
> a dependency in the first and will cause conflicts if merged via the
> virtio tree, both when applied and at merge window time - inside Linus
> tree.
>
> To avoid such conflicts and duplicate commits I think the net-next
> could pull from [1], while the virtio tree could pull from [2].
Or I could just merge all of this in my tree, if that's ok
with others?
Willem/Jason ok with you?
> ---
> v6 -> v7:
> - avoid warning in csky build
> - rebased
> v6: https://lore.kernel.org/netdev/cover.1750753211.git.pabeni@redhat.com/
>
> v5 -> v6:
> - fix integer overflow in patch 4/9
> v5: https://lore.kernel.org/netdev/cover.1750436464.git.pabeni@redhat.com/
>
> v4 -> v5:
> - added new patch 1/9 to avoid kdoc issues
> - encapsulate guest features guessing in new tap helper
> - cleaned-up SET_FEATURES_ARRAY
> - a few checkpatch fixes
> v4: https://lore.kernel.org/netdev/cover.1750176076.git.pabeni@redhat.com/
>
> v3 -> v4:
> - vnet sockopt cleanup
> - fixed offset for UDP-tunnel related field
> - use dev->features instead of flags
> v3: https://lore.kernel.org/netdev/cover.1749210083.git.pabeni@redhat.com/
>
> v2 -> v3:
> - uint128_t -> u64[2]
> - dropped related ifdef
> - define and use vnet_hdr with tunnel layouts
> v2: https://lore.kernel.org/netdev/cover.1748614223.git.pabeni@redhat.com/
>
> v1 -> v2:
> - fix build failures
> - many comment clarification
> - changed the vhost_net ioctl API
> - fixed some hdr <> skb helper bugs
> v1: https://lore.kernel.org/netdev/cover.1747822866.git.pabeni@redhat.com/
>
> Paolo Abeni (9):
> scripts/kernel_doc.py: properly handle VIRTIO_DECLARE_FEATURES
> virtio: introduce extended features
> virtio_pci_modern: allow configuring extended features
> vhost-net: allow configuring extended features
> virtio_net: add supports for extended offloads
> net: implement virtio helpers to handle UDP GSO tunneling.
> virtio_net: enable gso over UDP tunnel support.
> tun: enable gso over UDP tunnel support.
> vhost/net: enable gso over UDP tunnel support.
>
> drivers/net/tun.c | 58 ++++++--
> drivers/net/tun_vnet.h | 101 +++++++++++--
> drivers/net/virtio_net.c | 110 +++++++++++---
> drivers/vhost/net.c | 95 +++++++++---
> drivers/vhost/vhost.c | 2 +-
> drivers/vhost/vhost.h | 4 +-
> drivers/virtio/virtio.c | 43 +++---
> drivers/virtio/virtio_debug.c | 27 ++--
> drivers/virtio/virtio_pci_modern.c | 10 +-
> drivers/virtio/virtio_pci_modern_dev.c | 69 +++++----
> include/linux/virtio.h | 9 +-
> include/linux/virtio_config.h | 43 +++---
> include/linux/virtio_features.h | 88 +++++++++++
> include/linux/virtio_net.h | 197 ++++++++++++++++++++++++-
> include/linux/virtio_pci_modern.h | 43 +++++-
> include/uapi/linux/if_tun.h | 9 ++
> include/uapi/linux/vhost.h | 7 +
> include/uapi/linux/vhost_types.h | 5 +
> include/uapi/linux/virtio_net.h | 33 +++++
> scripts/lib/kdoc/kdoc_parser.py | 1 +
> 20 files changed, 790 insertions(+), 164 deletions(-)
> create mode 100644 include/linux/virtio_features.h
>
> --
> 2.49.0
next prev parent reply other threads:[~2025-07-08 15:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 7:08 [PATCH v7 net-next 0/9] virtio: introduce GSO over UDP tunnel Paolo Abeni
2025-07-08 7:08 ` [PATCH v7 net-next 1/9] scripts/kernel_doc.py: properly handle VIRTIO_DECLARE_FEATURES Paolo Abeni
2025-07-08 7:08 ` [PATCH v7 net-next 2/9] virtio: introduce extended features Paolo Abeni
2025-07-08 7:08 ` [PATCH v7 net-next 3/9] virtio_pci_modern: allow configuring " Paolo Abeni
2025-07-08 7:09 ` [PATCH v7 net-next 4/9] vhost-net: " Paolo Abeni
2025-07-08 7:09 ` [PATCH v7 net-next 5/9] virtio_net: add supports for extended offloads Paolo Abeni
2025-07-08 7:09 ` [PATCH v7 net-next 6/9] net: implement virtio helpers to handle UDP GSO tunneling Paolo Abeni
2025-07-08 7:09 ` [PATCH v7 net-next 7/9] virtio_net: enable gso over UDP tunnel support Paolo Abeni
2025-07-08 7:09 ` [PATCH v7 net-next 8/9] tun: " Paolo Abeni
2025-07-08 7:09 ` [PATCH v7 net-next 9/9] vhost/net: " Paolo Abeni
2025-07-08 15:01 ` Michael S. Tsirkin [this message]
2025-07-08 15:24 ` [PATCH v7 net-next 0/9] virtio: introduce GSO over UDP tunnel Jakub Kicinski
2025-07-08 16:00 ` Michael S. Tsirkin
2025-07-08 16:43 ` Paolo Abeni
2025-07-08 17:00 ` Paolo Abeni
2025-07-08 19:50 ` Michael S. Tsirkin
2025-07-08 18:23 ` Michael S. Tsirkin
2025-07-09 9:02 ` Paolo Abeni
2025-07-10 20:50 ` 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=20250708105816-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=akihiko.odaki@daynix.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=xuanzhuo@linux.alibaba.com \
--cc=yuri.benditovich@daynix.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).