summary refs log tree commit diff stats
path: root/net/tap-linux.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2025-09-22 16:18:27 +0200
committerMichael S. Tsirkin <mst@redhat.com>2025-10-04 10:51:02 -0400
commitfffac046282c99801b62fa7fa1032cdc261bca6d (patch)
treec412e39fdc180150f3e891d98b34d8d98fa4098b /net/tap-linux.h
parent3a7741c3bdc3537de4159418d712debbd22e4df6 (diff)
downloadfocaccia-qemu-fffac046282c99801b62fa7fa1032cdc261bca6d.tar.gz
focaccia-qemu-fffac046282c99801b62fa7fa1032cdc261bca6d.zip
net: implement tunnel probing
Tap devices support GSO over UDP tunnel offload. Probe for such
feature in a similar manner to other offloads.

GSO over UDP tunnel needs to be enabled in addition to a "plain"
offload (TSO or USO).

No need to check separately for the outer header checksum offload:
the kernel is going to support both of them or none.

The new features are disabled by default to avoid compat issues,
and could be enabled, after that hw_compat_10_1 will be added,
together with the related compat entries.

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: <a987a8a7613cbf33bb2209c7c7f5889b512638a7.1758549625.git.pabeni@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net/tap-linux.h')
-rw-r--r--net/tap-linux.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/tap-linux.h b/net/tap-linux.h
index 9a58cecb7f..8cd6b5874b 100644
--- a/net/tap-linux.h
+++ b/net/tap-linux.h
@@ -53,4 +53,13 @@
 #define TUN_F_USO4    0x20    /* I can handle USO for IPv4 packets */
 #define TUN_F_USO6    0x40    /* I can handle USO for IPv6 packets */
 
+/* I can handle TSO/USO for UDP tunneled packets */
+#define TUN_F_UDP_TUNNEL_GSO       0x080
+
+/*
+ * I can handle TSO/USO for UDP tunneled packets requiring csum offload for
+ * the outer header
+ */
+#define TUN_F_UDP_TUNNEL_GSO_CSUM  0x100
+
 #endif /* QEMU_TAP_LINUX_H */