diff options
author | 2023-01-15 16:16:10 +0900 | |
---|---|---|
committer | 2023-01-15 13:32:45 -0800 | |
commit | e69fe8459552f112d7327dff87953d40202c61f1 (patch) | |
tree | cd49bb327ebbe0899dba2e60951c0a231f4bfa16 /kernel/livepatch/patch.h | |
parent | samples/bpf: replace legacy map with the BTF-defined map (diff) | |
download | linux-rng-e69fe8459552f112d7327dff87953d40202c61f1.tar.xz linux-rng-e69fe8459552f112d7327dff87953d40202c61f1.zip |
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 <danieltimlee@gmail.com>
Link: https://lore.kernel.org/r/20230115071613.125791-8-danieltimlee@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/livepatch/patch.h')
0 files changed, 0 insertions, 0 deletions