BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v11 0/9] use network helpers, part 8
@ 2024-07-09  9:16 Geliang Tang
  2024-07-09  9:16 ` [PATCH bpf-next v11 1/9] selftests/bpf: Add backlog for network_helper_opts Geliang Tang
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Geliang Tang @ 2024-07-09  9:16 UTC (permalink / raw)
  To: Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko,
	Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Shuah Khan
  Cc: Geliang Tang, bpf, linux-kselftest

From: Geliang Tang <tanggeliang@kylinos.cn>

v11:
 - new patches 2, 4, 6.
 - drop expect_errno from network_helper_opts as Eduard and Martin
   suggested.
 - drop sockmap_ktls patches from this set.
 - add a new helper connect_fd_to_addr_str.

v10:
 - a new patch 10 is added.
 - patches 1-6, 8-9 unchanged, only commit logs updated.
 - "err = -errno" is used in patches 7, 11, 12 to get the real error
   number before checking value of "err".

v9:
 - new patches 5-7, new struct member expect_errno for network_helper_opts.
 - patches 1-4, 8-9 unchanged.
 - update patches 10-11 to make sure all tests pass.

v8:
 - only patch 8 updated, to fix errors reported by CI.

v7:
 - address Martin's comments in v6. (thanks)
 - use MAX(opts->backlog, 0) instead of opts->backlog.
 - use connect_to_fd_opts instead connect_to_fd.
 - more ASSERT_* to check errors.

v6:
 - update patch 6 as Daniel suggested. (thanks)

v5:
 - keep make_server and make_client as Eduard suggested.

v4:
 - a new patch to use make_sockaddr in sockmap_ktls.
 - a new patch to close fd in error path in drop_on_reuseport.
 - drop make_server() in patch 7.
 - drop make_client() too in patch 9.

v3:
 - a new patch to add backlog for network_helper_opts.
 - use start_server_str in sockmap_ktls now, not start_server.

v2:
 - address Eduard's comments in v1. (thanks)
 - fix errors reported by CI.

This patch set uses network helpers in sk_lookup, and drop the local
helpers inetaddr_len() and make_socket().

Geliang Tang (9):
  selftests/bpf: Add backlog for network_helper_opts
  selftests/bpf: Add ASSERT_OK_FD macro
  selftests/bpf: Close fd in error path in drop_on_reuseport
  selftests/bpf: Use start_server_str in sk_lookup
  selftests/bpf: Use start_server_addr in sk_lookup
  selftests/bpf: Use connect_fd_to_fd in sk_lookup
  selftests/bpf: Add connect_fd_to_addr_str helper
  selftests/bpf: Use connect_fd_to_addr_str in sk_lookup
  selftests/bpf: Drop make_socket in sk_lookup

 tools/testing/selftests/bpf/network_helpers.c |  23 ++-
 tools/testing/selftests/bpf/network_helpers.h |   7 +
 .../selftests/bpf/prog_tests/sk_lookup.c      | 156 ++++++------------
 tools/testing/selftests/bpf/test_progs.h      |   8 +
 4 files changed, 92 insertions(+), 102 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-07-10 19:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09  9:16 [PATCH bpf-next v11 0/9] use network helpers, part 8 Geliang Tang
2024-07-09  9:16 ` [PATCH bpf-next v11 1/9] selftests/bpf: Add backlog for network_helper_opts Geliang Tang
2024-07-09  9:16 ` [PATCH bpf-next v11 2/9] selftests/bpf: Add ASSERT_OK_FD macro Geliang Tang
2024-07-10 19:00   ` Martin KaFai Lau
2024-07-09  9:16 ` [PATCH bpf-next v11 3/9] selftests/bpf: Close fd in error path in drop_on_reuseport Geliang Tang
2024-07-10 19:02   ` Martin KaFai Lau
2024-07-09  9:16 ` [PATCH bpf-next v11 4/9] selftests/bpf: Use start_server_str in sk_lookup Geliang Tang
2024-07-09  9:16 ` [PATCH bpf-next v11 5/9] selftests/bpf: Use start_server_addr " Geliang Tang
2024-07-09  9:16 ` [PATCH bpf-next v11 6/9] selftests/bpf: Use connect_fd_to_fd " Geliang Tang
2024-07-10 19:04   ` Martin KaFai Lau
2024-07-09  9:16 ` [PATCH bpf-next v11 7/9] selftests/bpf: Add connect_fd_to_addr_str helper Geliang Tang
2024-07-10 19:20   ` Martin KaFai Lau
2024-07-09  9:16 ` [PATCH bpf-next v11 8/9] selftests/bpf: Use connect_fd_to_addr_str in sk_lookup Geliang Tang
2024-07-09  9:16 ` [PATCH bpf-next v11 9/9] selftests/bpf: Drop make_socket " Geliang Tang
2024-07-10 19:00 ` [PATCH bpf-next v11 0/9] use network helpers, part 8 patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox