OpenCloudOS-Kernel/tools/bpf/bpftool/Documentation
Larysa Zaremba f46392ee3d bpftool: Specify XDP Hints ifname when loading program
Add ability to specify a network interface used to resolve XDP hints
kfuncs when loading program through bpftool.

Usage:

  bpftool prog load [...] xdpmeta_dev <ifname>

Writing just 'dev <ifname>' instead of 'xdpmeta_dev' is a very probable
mistake that results in not very descriptive errors,
so 'bpftool prog load [...] dev <ifname>' syntax becomes deprecated,
followed by 'bpftool map create [...] dev <ifname>' for consistency.

Now, to offload program, execute:

  bpftool prog load [...] offload_dev <ifname>

To offload map:

  bpftool map create [...] offload_dev <ifname>

'dev <ifname>' still performs offloading in the commands above, but now
triggers a warning and is excluded from bash completion.

'xdpmeta_dev' and 'offload_dev' are mutually exclusive options, because
'xdpmeta_dev' basically makes a program device-bound without loading it
onto the said device. For now, offloaded programs cannot use XDP hints [0],
but if this changes, using 'offload_dev <ifname>' should cover this case.

  [0] https://lore.kernel.org/bpf/a5a636cc-5b03-686f-4be0-000383b05cfc@linux.dev

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20230517160103.1088185-1-larysa.zaremba@intel.com
2023-05-23 16:55:06 +02:00
..
Makefile bpftool: Add SPDX tags to RST documentation files 2021-11-16 13:56:22 +01:00
bpftool-btf.rst bpftool: Update doc (use susbtitutions) and test_bpftool_synctypes.py 2021-11-16 13:56:22 +01:00
bpftool-cgroup.rst bpftool: Use libbpf_bpf_attach_type_str 2022-06-02 16:26:30 -07:00
bpftool-feature.rst bpftool: Rename "bpftool feature list" into "... feature list_builtins" 2022-07-05 11:53:54 +02:00
bpftool-gen.rst bpftool: Add support for subskeletons 2022-03-17 23:12:39 -07:00
bpftool-iter.rst bpftool: Update doc (use susbtitutions) and test_bpftool_synctypes.py 2021-11-16 13:56:22 +01:00
bpftool-link.rst bpftool: Update doc (use susbtitutions) and test_bpftool_synctypes.py 2021-11-16 13:56:22 +01:00
bpftool-map.rst bpftool: Specify XDP Hints ifname when loading program 2023-05-23 16:55:06 +02:00
bpftool-net.rst bpftool: Update doc (use susbtitutions) and test_bpftool_synctypes.py 2021-11-16 13:56:22 +01:00
bpftool-perf.rst bpftool: Update doc (use susbtitutions) and test_bpftool_synctypes.py 2021-11-16 13:56:22 +01:00
bpftool-prog.rst bpftool: Specify XDP Hints ifname when loading program 2023-05-23 16:55:06 +02:00
bpftool-struct_ops.rst bpftool: Update doc to explain struct_ops register subcommand. 2023-04-21 11:10:10 -07:00
bpftool.rst bpftool: man: Add missing top level docs 2022-03-15 15:51:41 -07:00
common_options.rst bpftool: remove support of --legacy option for bpftool 2022-11-20 16:17:46 -08:00
substitutions.rst bpftool: remove support of --legacy option for bpftool 2022-11-20 16:17:46 -08:00