Thread (19 messages) 19 messages, 4 authors, 2020-02-28

Re: [PATCH bpf-next 6/7] selftests: bpf: add tests for UDP sockets in sockmap

From: Lorenz Bauer <hidden>
Date: 2020-02-27 12:02:41
Also in: bpf

On Thu, 27 Feb 2020 at 11:49, Jakub Sitnicki [off-list ref] wrote:
quoted
+#define TEST(fn) TEST_SOTYPE(fn, 0)
+#define TEST_STREAM(fn) TEST_SOTYPE(fn, SOCK_STREAM)
+#define TEST_DGRAM(fn) TEST_SOTYPE(fn, SOCK_DGRAM)
+
An alternative would be to use __VA_ARGS__ and designated intializers,
as I did recently in e0360423d020 ("selftests/bpf: Run SYN cookies with
reuseport BPF test only for TCP"). TEST_DGRAM is unused at the moment,
so that's something to consider.
Good idea, I'll pick it up!
test_redir() doesn't get called with SOCK_DGRAM, because redirection
with sockmap and UDP is not supported yet, so perhaps no need to touch
this function.
I did this to avoid needing another macro, it should be possible to skip this
with your VA_ARGS idea.
Looks like we can enable reuseport tests with not too much effort.
I managed to get them working with the changes below.
Thanks, I'll add this to the next revision!

-- 
Lorenz Bauer  |  Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK

www.cloudflare.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help