summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_sockmap_change_tail.c
AgeCommit message (Collapse)AuthorFilesLines
2024-12-21selftests/bpf: Add a BPF selftest for bpf_skb_change_tail()Cong Wang1-0/+40
As requested by Daniel, we need to add a selftest to cover bpf_skb_change_tail() cases in skb_verdict. Here we test trimming, growing and error cases, and validate its expected return values and the expected sizes of the payload. Signed-off-by: Cong Wang <cong.wang@bytedance.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20241213034057.246437-3-xiyou.wangcong@gmail.com