selftests/bpf: remove duplicated functions
authorKui-Feng Lee <thinker.li@gmail.com>
Tue, 8 Aug 2023 16:28:58 +0000 (09:28 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Wed, 9 Aug 2023 00:01:19 +0000 (17:01 -0700)
commit96ead1e702902c21513354174942415eed0958f3
tree6bc753ab0f32ae1c569b72e308d580fc92c0210a
parente546a119801f732f5c5c620d59be2e85aa732a8b
selftests/bpf: remove duplicated functions

The file cgroup_tcp_skb.c contains redundant implementations of the similar
functions (create_server_sock_v6(), connect_client_server_v6() and
get_sock_port_v6()) found in network_helpers.c. Let's eliminate these
duplicated functions.

Changes from v1:

 - Remove get_sock_port_v6() as well.

v1: https://lore.kernel.org/all/20230807193840.567962-1-thinker.li@gmail.com/

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20230808162858.326871-1-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/cgroup_tcp_skb.c