From: Kui-Feng Lee <sinquersw@gmail.com>
To: Martin KaFai Lau <martin.lau@linux.dev>, thinker.li@gmail.com
Cc: kuifeng@meta.com, bpf@vger.kernel.org, ast@kernel.org,
song@kernel.org, kernel-team@meta.com, andrii@kernel.org,
davemarchevsky@meta.com, dvernet@meta.com
Subject: Re: [RFC bpf-next v4 5/6] bpf: Create argument information for nullable arguments.
Date: Sun, 4 Feb 2024 17:53:56 -0800 [thread overview]
Message-ID: <337bf811-9e20-4a75-95e1-e0e60b831cbc@gmail.com> (raw)
In-Reply-To: <6b1d0822-73c4-472a-a170-947b53f2c66f@linux.dev>
On 2/2/24 16:40, Martin KaFai Lau wrote:
>
> I have a question/request.
>
> On top of tagging nullable, can we extend the ctx_arg_info idea here to
> allow changing the pointer type?
>
> In particular, take a stub function in bpf_tcp_ca.c:
>
> static u32 bpf_tcp_ca_ssthresh(struct tcp_sock *tp)
> {
> return 0;
> }
>
> Instead of the "struct sock *sk" argument as defined in the
> tcp_congestion_ops, the stub function uses "struct tcp_sock *tp'. If we
> can reuse the ctx_arg_info idea here, then it can remove the existing
> way of changing the pointer type from bpf_tcp_ca_is_valid_access.
>
A question just come to me. Why doesn't just define the argument as a
pointer to struct tpc_sock in the definition of the function pointer?
next prev parent reply other threads:[~2024-02-05 1:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 22:05 [RFC bpf-next v4 0/6] Support PTR_MAYBE_NULL for struct_ops arguments thinker.li
2024-02-02 22:05 ` [RFC bpf-next v4 1/6] bpf: Allow PTR_TO_BTF_ID even for pointers to int thinker.li
2024-02-02 22:05 ` [RFC bpf-next v4 2/6] bpf: Extend PTR_TO_BTF_ID to handle pointers to scalar and array types thinker.li
2024-02-03 0:52 ` Martin KaFai Lau
2024-02-03 1:03 ` Kui-Feng Lee
2024-02-02 22:05 ` [RFC bpf-next v4 3/6] bpf: Remove an unnecessary check thinker.li
2024-02-03 0:46 ` Martin KaFai Lau
2024-02-03 1:03 ` Kui-Feng Lee
2024-02-02 22:05 ` [RFC bpf-next v4 4/6] bpf: add btf pointer to struct bpf_ctx_arg_aux thinker.li
2024-02-02 22:05 ` [RFC bpf-next v4 5/6] bpf: Create argument information for nullable arguments thinker.li
2024-02-03 0:40 ` Martin KaFai Lau
2024-02-03 1:57 ` Kui-Feng Lee
2024-02-04 0:21 ` Kui-Feng Lee
2024-02-05 1:53 ` Kui-Feng Lee [this message]
2024-02-02 22:05 ` [RFC bpf-next v4 6/6] selftests/bpf: Test PTR_MAYBE_NULL arguments of struct_ops operators thinker.li
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=337bf811-9e20-4a75-95e1-e0e60b831cbc@gmail.com \
--to=sinquersw@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=davemarchevsky@meta.com \
--cc=dvernet@meta.com \
--cc=kernel-team@meta.com \
--cc=kuifeng@meta.com \
--cc=martin.lau@linux.dev \
--cc=song@kernel.org \
--cc=thinker.li@gmail.com \
/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