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.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -891,9 +891,12 @@ enum { · 890 unmodified lines | ||
| 891 | 891 | #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0) |
| 892 | 892 | #define XDP_FLAGS_SKB_MODE (1U << 1) |
| 893 | 893 | #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) | |
| 894 | 898 | #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \ |
| 895 | − XDP_FLAGS_SKB_MODE | \ | |
| 896 | − XDP_FLAGS_DRV_MODE) | |
| 899 | + XDP_FLAGS_MODES) | |
| 897 | 900 | |
| 898 | 901 | /* These are stored into IFLA_XDP_ATTACHED on dump. */ |
| 899 | 902 | enum { |