From patchwork Thu Jul 11 02:52:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 13729946 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A57FF4F5; Thu, 11 Jul 2024 02:53:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720666390; cv=none; b=hORKxLsEjvoDfsu64UysBJDqwDspF0hz60JKU2Pg8k8583HwhxhtIGA9mWfidl695TRDl86E3uYOeLuhDbjCOwc7EddxUW6x1oN1GZi/u7CRwF33UD2x4V4+RbDFYLxrFZfguJ/PdHMbV7NRIA8VKT/F+EelPJkvoQnZNIHBnrg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720666390; c=relaxed/simple; bh=r44fSjzV6vWT/nJWR3G/J3gjn/yh3TGuQwpgHd6S62Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=r5N07R6q4r9BZEg+XzPk6pLg6sQmC7TRHg29brcPpwjtD4Fz4jojEJbp2qjs+4wt+gWJ/pt6vYI/1JS7l8ko3yh6g2EFOlLtKaM6TRYH6HpsY2/wk+LuDCAoB66yuHDDJNwY0bP/FNN4dIUxHJCJInlFTEdFK20qsSF0qxkaUKw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Fdj4SV6d; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Fdj4SV6d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32B3CC32781; Thu, 11 Jul 2024 02:53:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720666389; bh=r44fSjzV6vWT/nJWR3G/J3gjn/yh3TGuQwpgHd6S62Y=; h=From:To:Cc:Subject:Date:From; b=Fdj4SV6dNy/1bqBKdWjbnS1FDR7ZKdgo4XfRHwjKzyTyKqbGvWVgluEVPmg0dzky+ x7XlhCo2Og7r7mVdqW3ld0FFQMt6AkrGKhelGKCHqUqIJPzJF/IsdUT9Zb9VnUZWnP 9WqpVdjEmvfYl+J3EOHoKoII5hrKepKrKGeXUmh0qRfEMWoWcc4TxodIKA4LP08Eo7 1q7GNTNv7pcQa0vzMau2DsEj2StPSbJuNn8KqpgTPOCmGRJXZWNsuRcOC7gCHmDd6v 5Hpkg2zywZtutkGtL2hxbt3LixbH8sT2MxQRwddgVUx3da4NJNYlJ9yaWnsSakP3Rr FN8Pwxl6a5DiA== From: Geliang Tang To: Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Hao Luo , Jiri Olsa , Shuah Khan Cc: Geliang Tang , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next 0/5] use network helpers, part 9 Date: Thu, 11 Jul 2024 10:52:47 +0800 Message-ID: X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Geliang Tang This is the 9th part of series "use network helpers" all BPF selftests wide. Patches 1-2 update network helpers interfaces suggested by Martin. Patch 3 adds a new helper connect_to_addr_str() as Martin suggested instead of adding connect_fd_to_addr_str(). Patch 4 uses this newly added helper in make_client(). Patch 5 uses make_client() in sk_lookup and drop make_socket(). Geliang Tang (5): selftests/bpf: Drop type of connect_to_fd_opts selftests/bpf: Drop must_fail from network_helper_opts selftests/bpf: Add connect_to_addr_str helper selftests/bpf: Use connect_to_addr_str in sk_lookup selftests/bpf: Drop make_socket in sk_lookup tools/testing/selftests/bpf/network_helpers.c | 67 +++++++-------- tools/testing/selftests/bpf/network_helpers.h | 5 +- .../selftests/bpf/prog_tests/bpf_tcp_ca.c | 2 +- .../selftests/bpf/prog_tests/cgroup_v1v2.c | 10 +-- .../selftests/bpf/prog_tests/sk_lookup.c | 84 ++++--------------- 5 files changed, 53 insertions(+), 115 deletions(-)