Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio-net: define USO host->guest features #120

Closed
ybendito opened this issue Oct 12, 2021 · 1 comment
Closed

virtio-net: define USO host->guest features #120

ybendito opened this issue Oct 12, 2021 · 1 comment

Comments

@ybendito
Copy link
Contributor

ybendito commented Oct 12, 2021

In addition to already defined USO (guest to host) feature, need to define respective host to guest feature that allows the guest to receive large UDP packets.
In case of guest-to-guest traffic this let us avoid segmentation of the packet that was sent with USO.
The feature is similar to VIRTIO_NET_F_GUEST_TSO4/6 but targets UDP packets.

https://lists.oasis-open.org/archives/virtio-comment/202110/msg00010.html

@mstsirkin
Copy link
Contributor

BALLOT CREATED AT URL: https://www.oasis-open.org/committees/ballot.php?id=3708

@cohuck cohuck closed this as completed in 6328f51 Jul 20, 2022
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Dec 12, 2022
Andrew Melnychenko says:

====================
TUN/VirtioNet USO features support.

Added new offloads for TUN devices TUN_F_USO4 and TUN_F_USO6.
Technically they enable NETIF_F_GSO_UDP_L4
(and only if USO4 & USO6 are set simultaneously).
It allows the transmission of large UDP packets.

UDP Segmentation Offload (USO/GSO_UDP_L4) - ability to split UDP packets
into several segments. It's similar to UFO, except it doesn't use IP
fragmentation. The drivers may push big packets and the NIC will split
them(or assemble them in case of receive), but in the case of VirtioNet
we just pass big UDP to the host. So we are freeing the driver from doing
the unnecessary job of splitting. The same thing for several guests
on one host, we can pass big packets between guests.

Different features USO4 and USO6 are required for qemu where Windows
guests can enable disable USO receives for IPv4 and IPv6 separately.
On the other side, Linux can't really differentiate USO4 and USO6, for now.
For now, to enable USO for TUN it requires enabling USO4 and USO6 together.
In the future, there would be a mechanism to control UDP_L4 GSO separately.

New types for virtio-net already in virtio-net specification:
oasis-tcs/virtio-spec#120

Test it WIP Qemu https://github.com/daynix/qemu/tree/USOv3

Changes since v4 & RFC:
 * Fixed typo and refactored.
 * Tun USO offload refactored.
 * Add support for guest-to-guest segmentation offload (thx Jason).
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants