aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/ethtool.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-07-09 17:42:47 -0700
committerDavid S. Miller <davem@davemloft.net>2020-07-10 13:54:00 -0700
commitc7d759eb7b12f91a25f4d3cd03ff5209046ddfc2 (patch)
treef11b19ed2d80954df499dd87d3520784a3536157 /include/uapi/linux/ethtool.h
parentudp_tunnel: add central NIC RX port offload infrastructure (diff)
downloadlinux-dev-c7d759eb7b12f91a25f4d3cd03ff5209046ddfc2.tar.xz
linux-dev-c7d759eb7b12f91a25f4d3cd03ff5209046ddfc2.zip
ethtool: add tunnel info interface
Add an interface to report offloaded UDP ports via ethtool netlink. Now that core takes care of tracking which UDP tunnel ports the NICs are aware of we can quite easily export this information out to user space. The responsibility of writing the netlink dumps is split between ethtool code and udp_tunnel_nic.c - since udp_tunnel module may not always be loaded, yet we should always report the capabilities of the NIC. $ ethtool --show-tunnels eth0 Tunnel information for eth0: UDP port table 0: Size: 4 Types: vxlan No entries UDP port table 1: Size: 4 Types: geneve, vxlan-gpe Entries (1): port 1230, vxlan-gpe v4: - back to v2, build fix is now directly in udp_tunnel.h v3: - don't compile ETHTOOL_MSG_TUNNEL_INFO_GET in if CONFIG_INET not set. v2: - fix string set count, - reorder enums in the uAPI, - fix type of ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES to bitset in docs and comments. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/ethtool.h')
-rw-r--r--include/uapi/linux/ethtool.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 60856e0f9618..b4f2d134e713 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -669,6 +669,7 @@ enum ethtool_link_ext_substate_cable_issue {
* @ETH_SS_SOF_TIMESTAMPING: SOF_TIMESTAMPING_* flags
* @ETH_SS_TS_TX_TYPES: timestamping Tx types
* @ETH_SS_TS_RX_FILTERS: timestamping Rx filters
+ * @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
*/
enum ethtool_stringset {
ETH_SS_TEST = 0,
@@ -686,6 +687,7 @@ enum ethtool_stringset {
ETH_SS_SOF_TIMESTAMPING,
ETH_SS_TS_TX_TYPES,
ETH_SS_TS_RX_FILTERS,
+ ETH_SS_UDP_TUNNEL_TYPES,
/* add new constants above here */
ETH_SS_COUNT