summaryrefslogtreecommitdiff
path: root/lib/test_bpf.c
diff options
context:
space:
mode:
authorVadim Fedorenko <vfedorenko@novek.ru>2021-09-10 01:04:08 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2021-09-10 23:19:58 +0200
commitf64c4acea51fbe2c08c0b0f48b7f5d1657d7a5e4 (patch)
tree3eba5257c1f02ab91894a0cb41e4b2fdd3981731 /lib/test_bpf.c
parente876a0367c379519f8558342fda30e74e0295893 (diff)
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 'lib/test_bpf.c')
0 files changed, 0 insertions, 0 deletions