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

2020-09-21 Thread Alexei Starovoitov
On Fri, Sep 18, 2020 at 02:10:42PM +0200, Nicolas Rybowski wrote: > + > +BPF_CALL_1(bpf_mptcp_sock, struct sock *, sk) > +{ > + if (sk_fullsock(sk) && sk->sk_protocol == IPPROTO_TCP && > sk_is_mptcp(sk)) { > + struct mptcp_subflow_context *mptcp_sfc = mptcp_subflow_ctx(sk); Could

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

2020-09-18 Thread Nicolas Rybowski
In order to precisely identify the parent MPTCP connection of a subflow, it is required to access the mptcp_sock's token which uniquely identify a MPTCP connection. This patch adds a new structure 'bpf_mptcp_sock' exposing the 'token' field of the 'mptcp_sock' extracted from a subflow's 'tcp_sock'