History

xdp: add HW offload mode flag for installing programs

Add an installation-time flag for requesting that the program be installed only if it can be offloaded to HW. Internally new command for ndo_xdp is added, this way we avoid putting checks into drivers since they all return -EINVAL on an unknown command.

Jakub Kicinski committed 9 years ago

Commit ee5d0321 parent 32d60274 files · +13 −6Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/if_link.h+5−2
@@ -891,9 +891,12 @@ enum { · 890 unmodified lines
891891 #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0)
892892 #define XDP_FLAGS_SKB_MODE (1U << 1)
893893 #define XDP_FLAGS_DRV_MODE (1U << 2)
894+#define XDP_FLAGS_HW_MODE (1U << 3)
895+#define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | \
896+ XDP_FLAGS_DRV_MODE | \
897+ XDP_FLAGS_HW_MODE)
894898 #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \
895− XDP_FLAGS_SKB_MODE | \
896− XDP_FLAGS_DRV_MODE)
899+ XDP_FLAGS_MODES)
897900
898901 /* These are stored into IFLA_XDP_ATTACHED on dump. */
899902 enum {