]> git.ipfire.org Git - thirdparty/linux.git/commit
Merge branch 'virtio_udp_tunnel_08_07_2025' of https://github.com/pabeni/linux-devel
authorJakub Kicinski <kuba@kernel.org>
Thu, 10 Jul 2025 20:32:35 +0000 (13:32 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Jul 2025 20:32:35 +0000 (13:32 -0700)
commitb430f6c38da629381f43b5ee723bd7e325ffa784
tree47181e16765012b8ab8fb4ecf2f2bbe920b11ba2
parent3321e97eab71df7d632b35276da9f8503e6e040f
parentbbca931fce262cdb3e5fddcc39e62f3bf9ac25cc
Merge branch 'virtio_udp_tunnel_08_07_2025' of https://github.com/pabeni/linux-devel

Paolo Abeni says:

====================
virtio: introduce GSO over UDP tunnel

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.
====================

Link: https://patch.msgid.link/cover.1751874094.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/tun.c
drivers/net/virtio_net.c
drivers/vhost/net.c