BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Geliang Tang <geliang@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	 Mykola Lysenko <mykolal@fb.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>,  Shuah Khan <shuah@kernel.org>
Cc: Geliang Tang <tanggeliang@kylinos.cn>,
	bpf@vger.kernel.org,  linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 1/6] selftests/bpf: Drop type from network_helper_opts
Date: Thu, 20 Jun 2024 15:47:50 -0700	[thread overview]
Message-ID: <dd1387bfa694e7d1f792441d1e2e80b9b85c8c35.camel@gmail.com> (raw)
In-Reply-To: <db1a7bdb3ae9b51001c1220d1783d816302598a7.1718765123.git.tanggeliang@kylinos.cn>

On Wed, 2024-06-19 at 10:51 +0800, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> The opts.{type, noconnect} is at least a bit non intuitive or unnecessary.
> The only use case now is in test_bpf_ip_check_defrag_ok which ends up
> bypassing most (or at least some) of the connect_to_fd_opts() logic. It's
> much better that test should have its own connect_to_fd_opts() instead.
> 
> This patch adds a new "type" parameter for connect_to_fd_opts(), then
> opts->type and getsockopt(SO_TYPE) can be replaced by "type" parameter in
> it.
> 
> In connect_to_fd(), use getsockopt(SO_TYPE) to get "type" value and pass
> it to connect_to_fd_opts().
> 
> In bpf_tcp_ca.c and cgroup_v1v2.c, "SOCK_STREAM" types are passed to
> connect_to_fd_opts(), and in ip_check_defrag.c, different types "SOCK_RAW"
> and "SOCK_DGRAM" are passed to it.
> 
> With these changes, the strcut member "type" of network_helper_opts can be
> dropped now.
> 
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---

Acked-by: Eduard Zingerman <eddyz87@gmail.com>

  reply	other threads:[~2024-06-20 22:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19  2:51 [PATCH bpf-next v5 0/6] use network helpers, part 7 Geliang Tang
2024-06-19  2:51 ` [PATCH bpf-next v5 1/6] selftests/bpf: Drop type from network_helper_opts Geliang Tang
2024-06-20 22:47   ` Eduard Zingerman [this message]
2024-06-19  2:51 ` [PATCH bpf-next v5 2/6] selftests/bpf: Use connect_to_addr in connect_to_fd_opt Geliang Tang
2024-06-20 22:28   ` Eduard Zingerman
2024-06-19  2:51 ` [PATCH bpf-next v5 3/6] selftests/bpf: Add client_socket helper Geliang Tang
2024-06-20 22:22   ` Eduard Zingerman
2024-06-19  2:51 ` [PATCH bpf-next v5 4/6] selftests/bpf: Drop noconnect from network_helper_opts Geliang Tang
2024-06-20 22:20   ` Eduard Zingerman
2024-06-20 22:51   ` Eduard Zingerman
2024-06-19  2:51 ` [PATCH bpf-next v5 5/6] selftests/bpf: Use start_server_str in mptcp Geliang Tang
2024-06-19  2:51 ` [PATCH bpf-next v5 6/6] selftests/bpf: Use start_server_str in test_tcp_check_syncookie_user Geliang Tang

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=dd1387bfa694e7d1f792441d1e2e80b9b85c8c35.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=geliang@kernel.org \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mykolal@fb.com \
    --cc=sdf@google.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=tanggeliang@kylinos.cn \
    --cc=yonghong.song@linux.dev \
    /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