]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: Add a selftest for bpf_csum_diff()
authorPuranjay Mohan <puranjay@kernel.org>
Sat, 26 Oct 2024 12:53:39 +0000 (12:53 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 30 Oct 2024 14:29:59 +0000 (15:29 +0100)
commit00c1f3dc66a38cf65c3cfd0cb4fe7acfc7f60e37
tree46398a19cf8a4ae5dfdeb5d67da7bd9002a3859a
parentb87f584024e1df289027cb7671de6af0d97b5de9
selftests/bpf: Add a selftest for bpf_csum_diff()

Add a selftest for the bpf_csum_diff() helper. This selftests runs the
helper in all three configurations(push, pull, and diff) and verifies
its output. The correct results have been computed by hand and by the
helper's older implementation.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20241026125339.26459-5-puranjay@kernel.org
tools/testing/selftests/bpf/prog_tests/test_csum_diff.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/csum_diff_test.c [new file with mode: 0644]