diff options
| author | Paolo Abeni <pabeni@redhat.com> | 2025-09-22 16:18:28 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-10-04 10:51:09 -0400 |
| commit | a5289563ad74a2a37e8d2101d82935454c71fef4 (patch) | |
| tree | 6fdfc1ef3f9e86420b91a2aa9e4e750e6fbcf4e5 /include/net/net.h | |
| parent | fffac046282c99801b62fa7fa1032cdc261bca6d (diff) | |
| download | focaccia-qemu-a5289563ad74a2a37e8d2101d82935454c71fef4.tar.gz focaccia-qemu-a5289563ad74a2a37e8d2101d82935454c71fef4.zip | |
net: implement UDP tunnel features offloading
When any host or guest GSO over UDP tunnel offload is enabled the virtio net header includes the additional tunnel-related fields, update the size accordingly. Push the GSO over UDP tunnel offloads all the way down to the tap device extending the newly introduced NetFeatures struct, and eventually enable the associated features. As per virtio specification, to convert features bit to offload bit, map the extended features into the reserved range. Finally, make the vhost backend aware of the exact header layout, to copy it correctly. The tunnel-related field are present if either the guest or the host negotiated any UDP tunnel related feature: add them to the kernel supported features list, to allow qemu transfer to the backend the needed information. Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Acked-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <093b4bc68368046bffbcab2202227632d6e4e83b.1758549625.git.pabeni@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/net/net.h')
| -rw-r--r-- | include/net/net.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/net.h b/include/net/net.h index 9a9084690d..72b476ee1d 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -43,6 +43,8 @@ typedef struct NetOffloads { bool ufo; bool uso4; bool uso6; + bool tnl; + bool tnl_csum; } NetOffloads; #define DEFINE_NIC_PROPERTIES(_state, _conf) \ |