Re: [PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-29 Thread Jordan Rife
> For the tests that moved to sock_addr.c, please also remove them from > test_sock_addr.c. Done in v3 (https://lore.kernel.org/bpf/20240429214529.2644801-1-jr...@google.com/T/#m560606260cda41652a7f305a0acff7fc8975d10a). -Jordan

Re: [PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-29 Thread Martin KaFai Lau
On 4/28/24 10:47 AM, Jordan Rife wrote: Also, all this setup (and test) has to be done in a new netns. Anything blocking the kfunc in patch 2 using the current task netns instead of the init_net? Add nodad to the "ip -6 addr add...". just in case it may add unnecessary delay. This interface/addre

Re: [PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-28 Thread Jordan Rife
> Also, all this setup (and test) has to be done in a new netns. Anything > blocking > the kfunc in patch 2 using the current task netns instead of the init_net? > Add nodad to the "ip -6 addr add...". just in case it may add unnecessary > delay. > This interface/address ping should not be needed

Re: [PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-22 Thread Martin KaFai Lau
On 4/18/24 9:37 AM, Jordan Rife wrote: The test_sock_addr.{c,sh} can be retired as long as all its tests are migrated to sock_addr.c test_sock_addr.c has a few more test dimensions than prog_tests/sock_addr.c currently does, so it covers a few more scenarios. struct sock_addr_test { const

Re: [PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-18 Thread Jordan Rife
> The test_sock_addr.{c,sh} can be retired as long as all its tests are migrated > to sock_addr.c test_sock_addr.c has a few more test dimensions than prog_tests/sock_addr.c currently does, so it covers a few more scenarios. struct sock_addr_test { const char *descr; /* BPF prog propertie

Re: [PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-17 Thread Martin KaFai Lau
On 4/17/24 10:08 AM, Jordan Rife wrote: Can the test_sock_addr.{c,sh} be retired after this patch? I know it's not used in the BPF CI tests, but is it still used in any other contexts? If anyone depends on the test_sock_addr binary, it will have to start using "./test_progs -t sock_addr". T

Re: [PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-17 Thread Jordan Rife
> I would like to take this chance to simplify the setup. > > Does it need a veth pair? The %s2 interface is not used. > > Can it be done in lo alone? I will look into this for the next spin of the patch series. > Also, all this setup (and test) has to be done in a new netns. Anything > blocking

Re: [PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-15 Thread Martin KaFai Lau
On 4/12/24 9:52 AM, Jordan Rife wrote: This patch lays the groundwork for testing IPv4 and IPv6 sockaddr hooks and their interaction with both socket syscalls and kernel functions (e.g. kernel_connect, kernel_bind, etc.) and moves the test cases from the old-style bpf/test_sock_addr.c self test i

Re: [PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-15 Thread Martin KaFai Lau
On 4/12/24 9:52 AM, Jordan Rife wrote: This patch lays the groundwork for testing IPv4 and IPv6 sockaddr hooks and their interaction with both socket syscalls and kernel functions (e.g. kernel_connect, kernel_bind, etc.) and moves the test cases from the old-style bpf/test_sock_addr.c self test i

[PATCH v2 bpf-next 4/6] selftests/bpf: Add IPv4 and IPv6 sockaddr test cases

2024-04-12 Thread Jordan Rife
This patch lays the groundwork for testing IPv4 and IPv6 sockaddr hooks and their interaction with both socket syscalls and kernel functions (e.g. kernel_connect, kernel_bind, etc.) and moves the test cases from the old-style bpf/test_sock_addr.c self test into the sock_addr prog_test. Signed-off-