[PATCH bpf-next v3 0/5] bpf: add MPTCP subflow support

2020-09-18 Thread Nicolas Rybowski
eld in bpf_tcp_sock is left as an __u32 to keep cohesion with the is_fullsock field from bpf_sock_ops. Also it seems easier with a __u32 on the verifier side. v1 -> v2: - add basic mandatory selftests for the new helper and is_mptcp field (Alexei) - rebase on latest bpf-next Nicolas Rybow

[PATCH bpf-next v3 3/5] bpf: add 'bpf_mptcp_sock' structure and helper

2020-09-18 Thread Nicolas Rybowski
7;token' of the msk but it is easily extensible. Acked-by: Matthieu Baerts Acked-by: Mat Martineau Acked-by: Song Liu Signed-off-by: Nicolas Rybowski --- include/linux/bpf.h| 33 include/uapi/linux/bpf.h | 14 +++ kernel/bpf/verifier.c | 30

[PATCH bpf-next v3 5/5] bpf: selftests: add bpf_mptcp_sock() verifier tests

2020-09-18 Thread Nicolas Rybowski
ned-off-by: Nicolas Rybowski --- Notes: v1 -> v2: - new patch: mandatory selftests (Alexei) tools/testing/selftests/bpf/verifier/sock.c | 63 + 1 file changed, 63 insertions(+) diff --git a/tools/testing/selftests/bpf/verifier/sock.c b/tools/testing/selftests

[PATCH bpf-next v3 4/5] bpf: selftests: add MPTCP test base

2020-09-18 Thread Nicolas Rybowski
the sockops program. Acked-by: Matthieu Baerts Acked-by: Song Liu Signed-off-by: Nicolas Rybowski --- Notes: v2 -> v3: - remove useless close_client_fd label (Song) - remove error count increment (Song) v1 -> v2: - new patch: mandatory selftests (Alexei)

[PATCH bpf-next v3 1/5] bpf: expose is_mptcp flag to bpf_tcp_sock

2020-09-18 Thread Nicolas Rybowski
Acked-by: Matthieu Baerts Acked-by: Mat Martineau Signed-off-by: Nicolas Rybowski --- include/uapi/linux/bpf.h | 1 + net/core/filter.c | 9 - tools/include/uapi/linux/bpf.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/bpf.h b

[PATCH bpf-next v3 2/5] mptcp: attach subflow socket to parent cgroup

2020-09-18 Thread Nicolas Rybowski
we have to do low level memcg manipulation, if required. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Acked-by: Matthieu Baerts Reviewed-by: Mat Martineau Acked-by: Song Liu Signed-off-by: Nicolas Rybowski --- net/mptcp/subflow.c | 27 +++ 1 file changed,

Re: [PATCH bpf-next v2 4/5] bpf: selftests: add MPTCP test base

2020-09-15 Thread Nicolas Rybowski
Hi Song, Thanks for the feedback ! On Mon, Sep 14, 2020 at 8:07 PM Song Liu wrote: > > On Fri, Sep 11, 2020 at 8:02 AM Nicolas Rybowski > wrote: > > > > This patch adds a base for MPTCP specific tests. > > > > It is currently limited to the is_mptcp field in

[PATCH bpf-next v2 5/5] bpf: selftests: add bpf_mptcp_sock() verifier tests

2020-09-11 Thread Nicolas Rybowski
field from bpf_mptcp_sock. Note that "token" is currently the only field in bpf_mptcp_sock. Currently, there is no easy way to test the token field since we cannot get back the mptcp_sock in userspace, this could be a future amelioration. Acked-by: Matthieu Baerts Signed-off-by: Nicola

[PATCH bpf-next v2 2/5] mptcp: attach subflow socket to parent cgroup

2020-09-11 Thread Nicolas Rybowski
we have to do low level memcg manipulation, if required. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Acked-by: Matthieu Baerts Reviewed-by: Mat Martineau Signed-off-by: Nicolas Rybowski --- net/mptcp/subflow.c | 27 +++ 1 file changed, 27 insertions(+) diff

[PATCH bpf-next v2 3/5] bpf: add 'bpf_mptcp_sock' structure and helper

2020-09-11 Thread Nicolas Rybowski
7;token' of the msk but it is easily extensible. Acked-by: Matthieu Baerts Acked-by: Mat Martineau Signed-off-by: Nicolas Rybowski --- include/linux/bpf.h| 33 include/uapi/linux/bpf.h | 14 +++ kernel/bpf/verifier.c | 30 ++

[PATCH bpf-next v2 1/5] bpf: expose is_mptcp flag to bpf_tcp_sock

2020-09-11 Thread Nicolas Rybowski
Acked-by: Matthieu Baerts Acked-by: Mat Martineau Signed-off-by: Nicolas Rybowski --- include/uapi/linux/bpf.h | 1 + net/core/filter.c | 9 - tools/include/uapi/linux/bpf.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/bpf.h b

[PATCH bpf-next v2 0/5] bpf: add MPTCP subflow support

2020-09-11 Thread Nicolas Rybowski
connection (socket mark, TCP congestion algorithm, ...) using BPF programs. It should also be the basis of exposing MPTCP-specific fields through BPF. v1 -> v2: - add basic mandatory selftests for the new helper and is_mptcp field (Alexei) - rebase on latest bpf-next Nicolas Rybowski (5):

[PATCH bpf-next v2 4/5] bpf: selftests: add MPTCP test base

2020-09-11 Thread Nicolas Rybowski
the sockops program. Acked-by: Matthieu Baerts Signed-off-by: Nicolas Rybowski --- Notes: v1 -> v2: - new patch: mandatory selftests (Alexei) tools/testing/selftests/bpf/config| 1 + tools/testing/selftests/bpf/network_helpers.c | 37 +- tools/testing/selftests/

Re: [PATCH bpf-next 0/3] bpf: add MPTCP subflow support

2020-08-27 Thread Nicolas Rybowski
Hi Alexei, On Wed, Aug 26, 2020 at 9:13 PM Alexei Starovoitov wrote: > > On Tue, Aug 25, 2020 at 11:55 AM Nicolas Rybowski > wrote: > > > > Hi Alexei, > > > > Thanks for the feedback! > > > > On Tue, Aug 25, 2020 at 12:01 AM Alexei Starovoitov >

Re: [PATCH bpf-next 0/3] bpf: add MPTCP subflow support

2020-08-25 Thread Nicolas Rybowski
Hi Alexei, Thanks for the feedback! On Tue, Aug 25, 2020 at 12:01 AM Alexei Starovoitov wrote: > > On Fri, Aug 21, 2020 at 05:15:38PM +0200, Nicolas Rybowski wrote: > > Previously it was not possible to make a distinction between plain TCP > > sockets and MPTCP subf

[PATCH bpf-next 3/3] bpf: add 'bpf_mptcp_sock' structure and helper

2020-08-21 Thread Nicolas Rybowski
7;token' of the msk but it is easily extensible. Acked-by: Matthieu Baerts Acked-by: Mat Martineau Signed-off-by: Nicolas Rybowski --- include/linux/bpf.h| 33 include/uapi/linux/bpf.h | 13 ++ kernel/bpf/verifier.c | 30 ++

[PATCH bpf-next 2/3] mptcp: attach subflow socket to parent cgroup

2020-08-21 Thread Nicolas Rybowski
we have to do low level memcg manipulation, if required. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Acked-by: Matthieu Baerts Reviewed-by: Mat Martineau Signed-off-by: Nicolas Rybowski --- net/mptcp/subflow.c | 27 +++ 1 file changed, 27 insertions(+) diff

[PATCH bpf-next 0/3] bpf: add MPTCP subflow support

2020-08-21 Thread Nicolas Rybowski
connection (socket mark, TCP congestion algorithm, ...) using BPF programs. It should also be the basis of exposing MPTCP-specific fields through BPF. Nicolas Rybowski (3): bpf: expose is_mptcp flag to bpf_tcp_sock mptcp: attach subflow socket to parent cgroup bpf: add 'bpf_mptcp

[PATCH bpf-next 1/3] bpf: expose is_mptcp flag to bpf_tcp_sock

2020-08-21 Thread Nicolas Rybowski
Acked-by: Matthieu Baerts Acked-by: Mat Martineau Signed-off-by: Nicolas Rybowski --- include/uapi/linux/bpf.h | 1 + net/core/filter.c | 9 - tools/include/uapi/linux/bpf.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/bpf.h b