(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

selftests/bpf: Add test for bpf_tcp_ops header option hooks

Add a test exercising the bpf_tcp_ops parse_hdr, hdr_opt_len and write_hdr_opt members together with the header option helpers. The struct_ops program (progs/bpf_tcp_ops_hdr.c) reserves space in hdr_opt_len via bpf_reserve_hdr_opt(), writes an experimental option in write_hdr_opt via bpf_store_hdr_opt(), and recovers it in parse_hdr via bpf_load_hdr_opt() on the incoming skb. Each hook bumps a counter and the parse hook records the option payload, so the three callbacks and all three overloaded helpers are covered. Signed-off-by: Amery Hung <ameryhung@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com> Link: https://patch.msgid.link/20260917200542.3689605-16-ameryhung@gmail.com


Author Amery Hung Committer Alexei Starovoitov Date Commit Parent ae7b5234
+163
2 changed files
+163
2 changed files