netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jörn-Thorben Hinz" <jthinz@mailbox.tu-berlin.de>
To: <bpf@vger.kernel.org>
Cc: "Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Martin KaFai Lau" <kafai@fb.com>,
	netdev@vger.kernel.org,
	"Jörn-Thorben Hinz" <jthinz@mailbox.tu-berlin.de>
Subject: [PATCH bpf-next v3 0/5] Align BPF TCP CCs implementing cong_control() with non-BPF CCs
Date: Tue, 14 Jun 2022 12:44:47 +0200	[thread overview]
Message-ID: <20220614104452.3370148-1-jthinz@mailbox.tu-berlin.de> (raw)

Addressed feedback by Martin KaFai Lau in this v3 of the series. See the
details below.

This series corrects some inconveniences for a BPF TCP CC that
implements and uses tcp_congestion_ops.cong_control(). Until now, such a
CC did not have all necessary write access to struct sock and
unnecessarily needed to implement cong_avoid().

v3:
 - Add a selftest writing sk_pacing_*
 - Add a selftest with incomplete tcp_congestion_ops
 - Add a selftest with unsupported get_info()
 - Remove an unused variable
 - Reword a comment about reg() in bpf_struct_ops_map_update_elem()
v2:
 - Drop redundant check for required functions and just rely on
   tcp_register_congestion_control() (Martin KaFai Lau)

Jörn-Thorben Hinz (5):
  bpf: Allow a TCP CC to write sk_pacing_rate and sk_pacing_status
  bpf: Require only one of cong_avoid() and cong_control() from a TCP CC
  selftests/bpf: Test a BPF CC writing sk_pacing_*
  selftests/bpf: Test an incomplete BPF CC
  selftests/bpf: Test a BPF CC implementing the unsupported get_info()

 kernel/bpf/bpf_struct_ops.c                   |  7 +-
 net/ipv4/bpf_tcp_ca.c                         | 39 ++---------
 .../selftests/bpf/prog_tests/bpf_tcp_ca.c     | 66 +++++++++++++++++++
 .../bpf/progs/tcp_ca_incompl_cong_ops.c       | 35 ++++++++++
 .../bpf/progs/tcp_ca_unsupp_cong_op.c         | 21 ++++++
 .../bpf/progs/tcp_ca_write_sk_pacing.c        | 60 +++++++++++++++++
 6 files changed, 191 insertions(+), 37 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/tcp_ca_incompl_cong_ops.c
 create mode 100644 tools/testing/selftests/bpf/progs/tcp_ca_unsupp_cong_op.c
 create mode 100644 tools/testing/selftests/bpf/progs/tcp_ca_write_sk_pacing.c

-- 
2.30.2


             reply	other threads:[~2022-06-14 10:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 10:44 Jörn-Thorben Hinz [this message]
2022-06-14 10:44 ` [PATCH bpf-next v3 1/5] bpf: Allow a TCP CC to write sk_pacing_rate and sk_pacing_status Jörn-Thorben Hinz
2022-06-17 20:21   ` Martin KaFai Lau
2022-06-14 10:44 ` [PATCH bpf-next v3 2/5] bpf: Require only one of cong_avoid() and cong_control() from a TCP CC Jörn-Thorben Hinz
2022-06-17 20:26   ` Martin KaFai Lau
2022-06-14 10:44 ` [PATCH bpf-next v3 3/5] selftests/bpf: Test a BPF CC writing sk_pacing_* Jörn-Thorben Hinz
2022-06-17 21:04   ` Martin KaFai Lau
2022-06-18 16:43     ` Jörn-Thorben Hinz
2022-06-20 16:06       ` Yonghong Song
2022-06-20 18:08         ` Martin KaFai Lau
2022-06-22 18:48           ` Jörn-Thorben Hinz
2022-06-14 10:44 ` [PATCH bpf-next v3 4/5] selftests/bpf: Test an incomplete BPF CC Jörn-Thorben Hinz
2022-06-14 10:44 ` [PATCH bpf-next v3 5/5] selftests/bpf: Test a BPF CC implementing the unsupported get_info() Jörn-Thorben Hinz
2022-06-17 21:22   ` Martin KaFai Lau

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=20220614104452.3370148-1-jthinz@mailbox.tu-berlin.de \
    --to=jthinz@mailbox.tu-berlin.de \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).