From: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> This syncs the XDP chain-map related UAPI definitions into tools/include/uapi. Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> --- tools/include/uapi/linux/bpf.h | 12 ++++++++++++ tools/include/uapi/linux/if_link.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 77c6be96d676..8b336fb68880 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -136,6 +136,7 @@ enum bpf_map_type { BPF_MAP_TYPE_STACK, BPF_MAP_TYPE_SK_STORAGE, BPF_MAP_TYPE_DEVMAP_HASH, + BPF_MAP_TYPE_XDP_CHAIN, }; /* Note that tracing related programs such as @@ -3153,6 +3154,17 @@ enum xdp_action { XDP_PASS, XDP_TX, XDP_REDIRECT, + + __XDP_ACT_MAX /* leave at end */ +}; +#define XDP_ACT_MAX (__XDP_ACT_MAX - 1) + +struct xdp_chain_acts { + __u32 wildcard_act; + __u32 drop_act; + __u32 pass_act; + __u32 tx_act; + __u32 redirect_act; }; /* user accessible metadata for XDP packet hook diff --git a/tools/include/uapi/linux/if_link.h b/tools/include/uapi/linux/if_link.h index 4a8c02cafa9a..7387d2371489 100644 --- a/tools/include/uapi/linux/if_link.h +++ b/tools/include/uapi/linux/if_link.h @@ -974,6 +974,8 @@ enum { IFLA_XDP_DRV_PROG_ID, IFLA_XDP_SKB_PROG_ID, IFLA_XDP_HW_PROG_ID, + IFLA_XDP_CHAIN_MAP_FD, + IFLA_XDP_CHAIN_MAP_ID, __IFLA_XDP_MAX, };