Re: [PATCH bpf-next v4 2/2] selftests/bpf: Add mptcp subflow subtest

2024-08-22 Thread Matthieu Baerts
Hi Manu, On 21/08/2024 22:32, Manu Bretelle wrote: > > >> On Aug 13, 2024, at 6:12 PM, Martin KaFai Lau wrote: >> >>> >> On 8/5/24 2:52 AM, Matthieu Baerts (NGI0) wrote: >>> +static int endpoint_init(char *flags) >>> +{ >>> + SYS(fail, "ip -net %s link add veth1 type veth peer name veth2", NS_T

Re: [PATCH bpf-next v4 2/2] selftests/bpf: Add mptcp subflow subtest

2024-08-21 Thread Manu Bretelle
> On Aug 13, 2024, at 6:12 PM, Martin KaFai Lau wrote: > > > > On 8/5/24 2:52 AM, Matthieu Baerts (NGI0) wrote: >> +static int endpoint_init(char *flags) >> +{ >> + SYS(fail, "ip -net %s link add veth1 type veth peer name veth2", NS_TEST); >> + SYS(fail, "ip -net %s addr add %s/24 dev veth1",

Re: [PATCH bpf-next v4 2/2] selftests/bpf: Add mptcp subflow subtest

2024-08-19 Thread Martin KaFai Lau
On 8/17/24 7:13 PM, Geliang Tang wrote: Take a look at a recent example [0]. The mptcp test is under a cgroup already and has the cgroup setup. An extra "cgroup/getsockopt" prog should be enough. That prog can walk the msk->conn_list and use bpf_rdonly_cast (or the >> bpf_core_cast macro in libb

Re: [PATCH bpf-next v4 2/2] selftests/bpf: Add mptcp subflow subtest

2024-08-17 Thread Geliang Tang
Hi Martin, Matt, On Wed, 2024-08-14 at 15:37 -0700, Martin KaFai Lau wrote: > On 8/14/24 3:04 AM, Matthieu Baerts wrote: > > Hi Martin, > > > > Thank you for your reply! > > > > On 14/08/2024 03:12, Martin KaFai Lau wrote: > > > On 8/5/24 2:52 AM, Matthieu Baerts (NGI0) wrote: > > > > +static in

Re: [PATCH bpf-next v4 2/2] selftests/bpf: Add mptcp subflow subtest

2024-08-15 Thread Matthieu Baerts
Hi Martin, Thank you for your reply! On 15/08/2024 00:37, Martin KaFai Lau wrote: > On 8/14/24 3:04 AM, Matthieu Baerts wrote: >> Hi Martin, >> >> Thank you for your reply! >> >> On 14/08/2024 03:12, Martin KaFai Lau wrote: >>> On 8/5/24 2:52 AM, Matthieu Baerts (NGI0) wrote: +static int end

Re: [PATCH bpf-next v4 2/2] selftests/bpf: Add mptcp subflow subtest

2024-08-14 Thread Martin KaFai Lau
On 8/14/24 3:04 AM, Matthieu Baerts wrote: Hi Martin, Thank you for your reply! On 14/08/2024 03:12, Martin KaFai Lau wrote: On 8/5/24 2:52 AM, Matthieu Baerts (NGI0) wrote: +static int endpoint_init(char *flags) +{ +    SYS(fail, "ip -net %s link add veth1 type veth peer name veth2", NS_TEST

Re: [PATCH bpf-next v4 2/2] selftests/bpf: Add mptcp subflow subtest

2024-08-14 Thread Martin KaFai Lau
On 8/5/24 2:52 AM, Matthieu Baerts (NGI0) wrote: +static void run_subflow(char *new) +{ + int server_fd, client_fd, err; + char cc[TCP_CA_NAME_MAX]; + socklen_t len = sizeof(cc); + + server_fd = start_mptcp_server(AF_INET, ADDR_1, PORT_1, 0); + if (!ASSERT_GE(server_

Re: [PATCH bpf-next v4 2/2] selftests/bpf: Add mptcp subflow subtest

2024-08-14 Thread Matthieu Baerts
Hi Martin, Thank you for your reply! On 14/08/2024 03:12, Martin KaFai Lau wrote: > On 8/5/24 2:52 AM, Matthieu Baerts (NGI0) wrote: >> +static int endpoint_init(char *flags) >> +{ >> +    SYS(fail, "ip -net %s link add veth1 type veth peer name veth2", >> NS_TEST); >> +    SYS(fail, "ip -net %s

Re: [PATCH bpf-next v4 2/2] selftests/bpf: Add mptcp subflow subtest

2024-08-13 Thread Martin KaFai Lau
On 8/5/24 2:52 AM, Matthieu Baerts (NGI0) wrote: +static int endpoint_init(char *flags) +{ + SYS(fail, "ip -net %s link add veth1 type veth peer name veth2", NS_TEST); + SYS(fail, "ip -net %s addr add %s/24 dev veth1", NS_TEST, ADDR_1); + SYS(fail, "ip -net %s link set dev veth