aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorDaniel T. Lee <[email protected]>2023-01-15 16:16:10 +0900
committerAlexei Starovoitov <[email protected]>2023-01-15 13:32:45 -0800
commite69fe8459552f112d7327dff87953d40202c61f1 (patch)
treecd49bb327ebbe0899dba2e60951c0a231f4bfa16 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parenta1f93c8fb0a836b6c891e51729f6cb98a1da47ba (diff)
samples/bpf: split common macros to net_shared.h
Currently, many programs under sample/bpf often include individual macros by directly including the header under "linux/" rather than using the "vmlinux.h" header. However, there are some problems with migrating to "vmlinux.h" because there is no definition for utility functions such as endianness conversion (ntohs/htons). Fortunately, the xdp_sample program already has a function that can be replaced to solve this problem. Therefore, this commit attempts to separate these functions into a file called net_shared.h to make them universally available. Additionally, this file includes network-related macros that are not defined in "vmlinux.h". (inspired by 'selftests' bpf_tracing_net.h) Signed-off-by: Daniel T. Lee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions