netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/4] transition sockmap testing to test_progs
@ 2024-01-24 18:53 John Fastabend
  2024-01-24 18:54 ` [PATCH bpf-next v2 1/4] bpf: sockmap, add test for sk_msg prog pop msg helper John Fastabend
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: John Fastabend @ 2024-01-24 18:53 UTC (permalink / raw)
  To: jakub, bpf; +Cc: netdev, john.fastabend, andrii

Its much easier to write and read tests than it was when sockmap was
originally created. At that time we created a test_sockmap prog that
did sockmap tests. But, its showing its age now. For example it reads
user vars out of maps, is hard to run targetted tests, has a different
format from the familiar test_progs and so on.

I recently thought there was an issue with pop helpers so I created
some tests to try and track it down. It turns out it was a bug in the
BPF program we had not the kernel. But, I think it makes sense to
start deprecating test_sockmap and converting these to the nicer
test_progs.

So this is a first round of test_prog tests for sockmap cork and
pop helpers. I'll add push and pull tests shortly. I think its fine,
maybe preferred to review smaller patchsets, to send these
incrementally as I get them created.

Thanks!

v2: fix unint vars in some branches from `make RELEASE=1`


John Fastabend (4):
  bpf: sockmap, add test for sk_msg prog pop msg helper
  bpf: sockmap, add a sendmsg test so we can check that path
  bpf: sockmap, add a cork to force buffering of the scatterlist
  bpf: sockmap test cork and pop combined

 .../bpf/prog_tests/sockmap_helpers.h          |  18 +
 .../bpf/prog_tests/sockmap_msg_helpers.c      | 353 ++++++++++++++++++
 .../bpf/progs/test_sockmap_msg_helpers.c      |  67 ++++
 3 files changed, 438 insertions(+)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/sockmap_msg_helpers.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_sockmap_msg_helpers.c

-- 
2.33.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-01-26 15:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-24 18:53 [PATCH bpf-next v2 0/4] transition sockmap testing to test_progs John Fastabend
2024-01-24 18:54 ` [PATCH bpf-next v2 1/4] bpf: sockmap, add test for sk_msg prog pop msg helper John Fastabend
2024-01-26 11:48   ` Jakub Sitnicki
2024-01-26 15:37     ` John Fastabend
2024-01-24 18:54 ` [PATCH bpf-next v2 2/4] bpf: sockmap, add a sendmsg test so we can check that path John Fastabend
2024-01-26 12:17   ` Jakub Sitnicki
2024-01-26 14:24     ` Jakub Sitnicki
2024-01-26 15:38     ` John Fastabend
2024-01-24 18:54 ` [PATCH bpf-next v2 3/4] bpf: sockmap, add a cork to force buffering of the scatterlist John Fastabend
2024-01-26 14:19   ` Jakub Sitnicki
2024-01-26 15:38     ` John Fastabend
2024-01-24 18:54 ` [PATCH bpf-next v2 4/4] bpf: sockmap test cork and pop combined John Fastabend
2024-01-24 22:58 ` [PATCH bpf-next v2 0/4] transition sockmap testing to test_progs John Fastabend
2024-01-26 14:39 ` Jakub Sitnicki
2024-01-26 15:40   ` John Fastabend

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).