mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Rybowski <nicolas.rybowski@tessares.net>
To: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andriin@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>, Martin KaFai Lau <kafai@fb.com>,
	Mat Martineau <mathew.j.martineau@linux.intel.com>,
	Matthieu Baerts <matthieu.baerts@tessares.net>,
	Shuah Khan <shuah@kernel.org>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>
Cc: Nicolas Rybowski <nicolas.rybowski@tessares.net>,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, mptcp@lists.01.org,
	netdev@vger.kernel.org
Subject: [PATCH bpf-next v2 0/5] bpf: add MPTCP subflow support
Date: Fri, 11 Sep 2020 16:30:21 +0200	[thread overview]
Message-ID: <20200911143022.414783-6-nicolas.rybowski@tessares.net> (raw)
In-Reply-To: <20200911143022.414783-1-nicolas.rybowski@tessares.net>

Previously it was not possible to make a distinction between plain TCP
sockets and MPTCP subflow sockets on the BPF_PROG_TYPE_SOCK_OPS hook.

This patch series now enables a fine control of subflow sockets. In its
current state, it allows to put different sockopt on each subflow from a
same MPTCP 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):
  bpf: expose is_mptcp flag to bpf_tcp_sock
  mptcp: attach subflow socket to parent cgroup
  bpf: add 'bpf_mptcp_sock' structure and helper
  bpf: selftests: add MPTCP test base
  bpf: selftests: add bpf_mptcp_sock() verifier tests

 include/linux/bpf.h                           |  33 +++++
 include/uapi/linux/bpf.h                      |  15 +++
 kernel/bpf/verifier.c                         |  30 +++++
 net/core/filter.c                             |  13 +-
 net/mptcp/Makefile                            |   2 +
 net/mptcp/bpf.c                               |  72 +++++++++++
 net/mptcp/subflow.c                           |  27 ++++
 scripts/bpf_helpers_doc.py                    |   2 +
 tools/include/uapi/linux/bpf.h                |  15 +++
 tools/testing/selftests/bpf/config            |   1 +
 tools/testing/selftests/bpf/network_helpers.c |  37 +++++-
 tools/testing/selftests/bpf/network_helpers.h |   3 +
 .../testing/selftests/bpf/prog_tests/mptcp.c  | 119 ++++++++++++++++++
 tools/testing/selftests/bpf/progs/mptcp.c     |  48 +++++++
 tools/testing/selftests/bpf/verifier/sock.c   |  63 ++++++++++
 15 files changed, 474 insertions(+), 6 deletions(-)
 create mode 100644 net/mptcp/bpf.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/mptcp.c
 create mode 100644 tools/testing/selftests/bpf/progs/mptcp.c

-- 
2.28.0


  parent reply	other threads:[~2020-09-11 16:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 14:30 [PATCH bpf-next v2 1/5] bpf: expose is_mptcp flag to bpf_tcp_sock Nicolas Rybowski
2020-09-11 14:30 ` [PATCH bpf-next v2 2/5] mptcp: attach subflow socket to parent cgroup Nicolas Rybowski
2020-09-14 20:52   ` Song Liu
2020-09-11 14:30 ` [PATCH bpf-next v2 3/5] bpf: add 'bpf_mptcp_sock' structure and helper Nicolas Rybowski
2020-09-14 21:00   ` Song Liu
2020-09-11 14:30 ` [PATCH bpf-next v2 4/5] bpf: selftests: add MPTCP test base Nicolas Rybowski
2020-09-14 18:07   ` Song Liu
2020-09-15 16:35     ` Nicolas Rybowski
2020-09-15 17:18       ` Song Liu
2020-09-11 14:30 ` [PATCH bpf-next v2 5/5] bpf: selftests: add bpf_mptcp_sock() verifier tests Nicolas Rybowski
2020-09-14 18:08   ` Song Liu
2020-09-11 14:30 ` Nicolas Rybowski [this message]
2020-09-14 18:20 ` [PATCH bpf-next v2 1/5] bpf: expose is_mptcp flag to bpf_tcp_sock Song Liu
2020-09-14 22:13   ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200911143022.414783-6-nicolas.rybowski@tessares.net \
    --to=nicolas.rybowski@tessares.net \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.01.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®