diff options
author | 2021-09-10 01:04:08 +0300 | |
---|---|---|
committer | 2021-09-10 23:19:58 +0200 | |
commit | f64c4acea51fbe2c08c0b0f48b7f5d1657d7a5e4 (patch) | |
tree | 3eba5257c1f02ab91894a0cb41e4b2fdd3981731 /tools/testing/selftests/bpf/prog_tests/module_attach.c | |
parent | Merge branch 'bpf-xsk-selftests' (diff) | |
download | linux-dev-f64c4acea51fbe2c08c0b0f48b7f5d1657d7a5e4.tar.xz linux-dev-f64c4acea51fbe2c08c0b0f48b7f5d1657d7a5e4.zip |
bpf: Add hardware timestamp field to __sk_buff
BPF programs may want to know hardware timestamps if NIC supports
such timestamping.
Expose this data as hwtstamp field of __sk_buff the same way as
gso_segs/gso_size. This field could be accessed from the same
programs as tstamp field, but it's read-only field. Explicit test
to deny access to padding data is added to bpf_skb_is_valid_access.
Also update BPF_PROG_TEST_RUN tests of the feature.
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210909220409.8804-2-vfedorenko@novek.ru
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/module_attach.c')
0 files changed, 0 insertions, 0 deletions