diff options
author | Maciej Fijalkowski <maciej.fijalkowski@intel.com> | 2023-07-19 16:24:07 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-07-19 19:56:49 +0300 |
commit | 13ce2daa259a3bfbc9a5aeeee8b9a87058703731 (patch) | |
tree | ef12d37cd6fa2b51aa36f2368197a77c6872fe4a /tools/lib/bpf/libbpf.h | |
parent | 07428da9e25a5dfae7252cd554c90557f9086a73 (diff) | |
download | linux-13ce2daa259a3bfbc9a5aeeee8b9a87058703731.tar.xz |
xsk: add new netlink attribute dedicated for ZC max frags
Introduce new netlink attribute NETDEV_A_DEV_XDP_ZC_MAX_SEGS that will
carry maximum fragments that underlying ZC driver is able to handle on
TX side. It is going to be included in netlink response only when driver
supports ZC. Any value higher than 1 implies multi-buffer ZC support on
underlying device.
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/r/20230719132421.584801-11-maciej.fijalkowski@intel.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
-rw-r--r-- | tools/lib/bpf/libbpf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h index 10642ad69d76..674e5788eb10 100644 --- a/tools/lib/bpf/libbpf.h +++ b/tools/lib/bpf/libbpf.h @@ -1105,9 +1105,10 @@ struct bpf_xdp_query_opts { __u32 skb_prog_id; /* output */ __u8 attach_mode; /* output */ __u64 feature_flags; /* output */ + __u32 xdp_zc_max_segs; /* output */ size_t :0; }; -#define bpf_xdp_query_opts__last_field feature_flags +#define bpf_xdp_query_opts__last_field xdp_zc_max_segs LIBBPF_API int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags, const struct bpf_xdp_attach_opts *opts); |