]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: update map definition to new syntax BTF-defined map
authorDaniel T. Lee <danieltimlee@gmail.com>
Thu, 7 Nov 2019 00:51:53 +0000 (09:51 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 9 Nov 2019 03:21:52 +0000 (19:21 -0800)
commitf8d278e521248ea51a2517bfab3cf6085c9083f5
treec920619afdfd1f62787fcf94f549b5a1c0ec3537
parenta8af6a23ec7b7640531851838dab0d2847142820
samples: bpf: update map definition to new syntax BTF-defined map

Since, the new syntax of BTF-defined map has been introduced,
the syntax for using maps under samples directory are mixed up.
For example, some are already using the new syntax, and some are using
existing syntax by calling them as 'legacy'.

As stated at commit 25dd5cfedbb7 ("libbpf: allow specifying map
definitions using BTF"), the BTF-defined map has more compatablility
with extending supported map definition features.

The commit doesn't replace all of the map to new BTF-defined map,
because some of the samples still use bpf_load instead of libbpf, which
can't properly create BTF-defined map.

This will only updates the samples which uses libbpf API for loading bpf
program. (ex. bpf_prog_load_xattr)

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
12 files changed:
samples/bpf/sockex1_kern.c
samples/bpf/sockex2_kern.c
samples/bpf/xdp1_kern.c
samples/bpf/xdp2_kern.c
samples/bpf/xdp_adjust_tail_kern.c
samples/bpf/xdp_fwd_kern.c
samples/bpf/xdp_redirect_cpu_kern.c
samples/bpf/xdp_redirect_kern.c
samples/bpf/xdp_redirect_map_kern.c
samples/bpf/xdp_router_ipv4_kern.c
samples/bpf/xdp_rxq_info_kern.c
samples/bpf/xdp_tx_iptunnel_kern.c