1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 2 /* Do not edit directly, auto-generated from: */ 3 /* Documentation/netlink/specs/netdev.yaml */ 4 /* YNL-GEN uapi header */ 5 6 #ifndef _UAPI_LINUX_NETDEV_H 7 #define _UAPI_LINUX_NETDEV_H 8 9 #define NETDEV_FAMILY_NAME "netdev" 10 #define NETDEV_FAMILY_VERSION 1 11 12 /** 13 * enum netdev_xdp_act 14 * @NETDEV_XDP_ACT_BASIC: XDP features set supported by all drivers 15 * (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX) 16 * @NETDEV_XDP_ACT_REDIRECT: The netdev supports XDP_REDIRECT 17 * @NETDEV_XDP_ACT_NDO_XMIT: This feature informs if netdev implements 18 * ndo_xdp_xmit callback. 19 * @NETDEV_XDP_ACT_XSK_ZEROCOPY: This feature informs if netdev supports AF_XDP 20 * in zero copy mode. 21 * @NETDEV_XDP_ACT_HW_OFFLOAD: This feature informs if netdev supports XDP hw 22 * offloading. 23 * @NETDEV_XDP_ACT_RX_SG: This feature informs if netdev implements non-linear 24 * XDP buffer support in the driver napi callback. 25 * @NETDEV_XDP_ACT_NDO_XMIT_SG: This feature informs if netdev implements 26 * non-linear XDP buffer support in ndo_xdp_xmit callback. 27 */ 28 enum netdev_xdp_act { 29 NETDEV_XDP_ACT_BASIC = 1, 30 NETDEV_XDP_ACT_REDIRECT = 2, 31 NETDEV_XDP_ACT_NDO_XMIT = 4, 32 NETDEV_XDP_ACT_XSK_ZEROCOPY = 8, 33 NETDEV_XDP_ACT_HW_OFFLOAD = 16, 34 NETDEV_XDP_ACT_RX_SG = 32, 35 NETDEV_XDP_ACT_NDO_XMIT_SG = 64, 36 37 /* private: */ 38 NETDEV_XDP_ACT_MASK = 127, 39 }; 40 41 /** 42 * enum netdev_xdp_rx_metadata 43 * @NETDEV_XDP_RX_METADATA_TIMESTAMP: Device is capable of exposing receive HW 44 * timestamp via bpf_xdp_metadata_rx_timestamp(). 45 * @NETDEV_XDP_RX_METADATA_HASH: Device is capable of exposing receive packet 46 * hash via bpf_xdp_metadata_rx_hash(). 47 */ 48 enum netdev_xdp_rx_metadata { 49 NETDEV_XDP_RX_METADATA_TIMESTAMP = 1, 50 NETDEV_XDP_RX_METADATA_HASH = 2, 51 52 /* private: */ 53 NETDEV_XDP_RX_METADATA_MASK = 3, 54 }; 55 56 enum { 57 NETDEV_A_DEV_IFINDEX = 1, 58 NETDEV_A_DEV_PAD, 59 NETDEV_A_DEV_XDP_FEATURES, 60 NETDEV_A_DEV_XDP_ZC_MAX_SEGS, 61 NETDEV_A_DEV_XDP_RX_METADATA_FEATURES, 62 63 __NETDEV_A_DEV_MAX, 64 NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1) 65 }; 66 67 enum { 68 NETDEV_CMD_DEV_GET = 1, 69 NETDEV_CMD_DEV_ADD_NTF, 70 NETDEV_CMD_DEV_DEL_NTF, 71 NETDEV_CMD_DEV_CHANGE_NTF, 72 73 __NETDEV_CMD_MAX, 74 NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1) 75 }; 76 77 #define NETDEV_MCGRP_MGMT "mgmt" 78 79 #endif /* _UAPI_LINUX_NETDEV_H */ 80