bpf: sockmap sample test for bpf_msg_pull_data
This adds an option to test the msg_pull_data helper. This uses two options txmsg_start and txmsg_end to let the user specify start and end bytes to pull. The options can be used with txmsg_apply, txmsg_cork options as well as with any of the basic tests, txmsg, txmsg_redir and txmsg_drop (plus noisy variants) to run pull_data inline with those tests. By giving user direct control over the variables we can easily do negative testing as well as positive tests. Signed-off-by:John Fastabend <john.fastabend@gmail.com> Acked-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net>
Showing
- samples/sockmap/sockmap_kern.c 65 additions, 14 deletionssamples/sockmap/sockmap_kern.c
- samples/sockmap/sockmap_user.c 32 additions, 0 deletionssamples/sockmap/sockmap_user.c
- tools/include/uapi/linux/bpf.h 2 additions, 1 deletiontools/include/uapi/linux/bpf.h
- tools/testing/selftests/bpf/bpf_helpers.h 2 additions, 0 deletionstools/testing/selftests/bpf/bpf_helpers.h
Loading
Please register or sign in to comment