mbox series

[bpf-next,v2,00/14] use start_server and connect_to helpers

Message ID cover.1712796967.git.tanggeliang@kylinos.cn (mailing list archive)
Headers show
Series use start_server and connect_to helpers | expand

Message

Geliang Tang April 11, 2024, 1:03 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

v2:
 - update patch 6 only, fix errors reported by CI.

This patchset uses public helpers start_server_* and connect_to_* defined
in network_helpers.c to drop duplicate code.

Geliang Tang (14):
  selftests/bpf: Add start_server_addr helper
  selftests/bpf: Use start_server_addr in cls_redirect
  selftests/bpf: Use connect_to_addr in cls_redirect
  selftests/bpf: Use start_server_addr in sk_assign
  selftests/bpf: Use connect_to_addr in sk_assign
  selftests/bpf: Use log_err in network_helpers
  selftests/bpf: Use start_server_addr in test_sock_addr
  selftests/bpf: Use connect_to_addr in test_sock_addr
  selftests/bpf: Add function pointer for __start_server
  selftests/bpf: Add start_server_setsockopt helper
  selftests/bpf: Use start_server_setsockopt in sockopt_inherit
  selftests/bpf: Use connect_to_fd in sockopt_inherit
  selftests/bpf: Use start_server_* in test_tcp_check_syncookie
  selftests/bpf: Use connect_to_addr in test_tcp_check_syncookie

 tools/testing/selftests/bpf/Makefile          |  4 +-
 tools/testing/selftests/bpf/network_helpers.c | 50 ++++++++----
 tools/testing/selftests/bpf/network_helpers.h |  4 +
 .../selftests/bpf/prog_tests/cls_redirect.c   | 38 +---------
 .../selftests/bpf/prog_tests/sk_assign.c      | 53 +------------
 .../bpf/prog_tests/sockopt_inherit.c          | 64 ++++------------
 tools/testing/selftests/bpf/test_sock_addr.c  | 74 ++----------------
 .../bpf/test_tcp_check_syncookie_user.c       | 76 +++----------------
 8 files changed, 83 insertions(+), 280 deletions(-)

Comments

Eduard Zingerman April 12, 2024, 6:52 p.m. UTC | #1
On Thu, 2024-04-11 at 09:03 +0800, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> v2:
>  - update patch 6 only, fix errors reported by CI.
> 
> This patchset uses public helpers start_server_* and connect_to_* defined
> in network_helpers.c to drop duplicate code.

Modulo feedback from Martin and connect_to_addr() not setting default
timeout this series looks good, thank you.