From: Martin KaFai Lau <martin.lau@linux.dev>
To: Daniel Borkmann <daniel@iogearbox.net>,
Ji Rongfeng <SikoJobs@outlook.com>
Cc: ast@kernel.org, andrii@kernel.org, song@kernel.org, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org, joannelkoong@gmail.com,
kuifeng@fb.com, lorenzo@kernel.org, maximmi@nvidia.com,
quentin@isovalent.com, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf v2] bpf: Update bpf_{g,s}etsockopt() documentation
Date: Wed, 23 Nov 2022 16:40:50 -0800 [thread overview]
Message-ID: <6fbd8c35-04de-c379-5062-a0b9d4a8ebbe@linux.dev> (raw)
In-Reply-To: <0977584d-8aff-624d-4cf8-a6e4868958c5@iogearbox.net>
On 11/23/22 4:18 PM, Daniel Borkmann wrote:
> On 11/18/22 9:18 AM, Ji Rongfeng wrote:
>> * append missing optnames to the end
>> * simplify bpf_getsockopt()'s doc
>>
>> Signed-off-by: Ji Rongfeng <SikoJobs@outlook.com>
>> ---
>> include/uapi/linux/bpf.h | 20 ++++++++++++--------
>> tools/include/uapi/linux/bpf.h | 20 ++++++++++++--------
>> 2 files changed, 24 insertions(+), 16 deletions(-)
>>
>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>> index 51b9aa640ad2..14f29d95ea71 100644
>> --- a/include/uapi/linux/bpf.h
>> +++ b/include/uapi/linux/bpf.h
>> @@ -2576,14 +2576,19 @@ union bpf_attr {
>> * * **SOL_SOCKET**, which supports the following *optname*\ s:
>> * **SO_RCVBUF**, **SO_SNDBUF**, **SO_MAX_PACING_RATE**,
>> * **SO_PRIORITY**, **SO_RCVLOWAT**, **SO_MARK**,
>> - * **SO_BINDTODEVICE**, **SO_KEEPALIVE**.
>> + * **SO_BINDTODEVICE**, **SO_KEEPALIVE**, **SO_REUSEADDR**,
>> + * **SO_REUSEPORT**, **SO_BINDTOIFINDEX**, **SO_TXREHASH**.
>> * * **IPPROTO_TCP**, which supports the following *optname*\ s:
>> * **TCP_CONGESTION**, **TCP_BPF_IW**,
>> * **TCP_BPF_SNDCWND_CLAMP**, **TCP_SAVE_SYN**,
>> * **TCP_KEEPIDLE**, **TCP_KEEPINTVL**, **TCP_KEEPCNT**,
>> - * **TCP_SYNCNT**, **TCP_USER_TIMEOUT**, **TCP_NOTSENT_LOWAT**.
>> + * **TCP_SYNCNT**, **TCP_USER_TIMEOUT**, **TCP_NOTSENT_LOWAT**,
>> + * **TCP_NODELAY**, **TCP_MAXSEG**, **TCP_WINDOW_CLAMP**,
>> + * **TCP_THIN_LINEAR_TIMEOUTS**, **TCP_BPF_DELACK_MAX**,
>> + * **TCP_BPF_RTO_MIN**.
>> * * **IPPROTO_IP**, which supports *optname* **IP_TOS**.
>> - * * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.
>> + * * **IPPROTO_IPV6**, which supports the following *optname*\ s:
>> + * **IPV6_TCLASS**, **IPV6_AUTOFLOWLABEL**.
>> * Return
>> * 0 on success, or a negative error in case of failure.
>> *
>> @@ -2800,12 +2805,11 @@ union bpf_attr {
>> * and **BPF_CGROUP_INET6_CONNECT**.
>> *
>> * This helper actually implements a subset of **getsockopt()**.
>> - * It supports the following *level*\ s:
>> + * It supports the same set of *optname*\ s that supported by
>
> nit: that is supported by
>
>> + * **bpf_setsockopt**\ () helper with a few exceptions:
>> *
>> - * * **IPPROTO_TCP**, which supports *optname*
>> - * **TCP_CONGESTION**.
>> - * * **IPPROTO_IP**, which supports *optname* **IP_TOS**.
>> - * * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.
>> + * * **bpf_setsockopt**\ () helper only: **TCP_BPF_***.
>> + * * **bpf_getsockopt**\ () helper only: **TCP_SAVED_SYNC**.
>
> I think from a user PoV the above is a bit hard to follow, maybe take Martin's
> earlier feedback into account and add a proper sentence; it will be much easier
> to understand.
+1 Made the change and also fixed TCP_SAVED_SYNC with s/SYNC/SYN/ while
applying. Thanks!
next prev parent reply other threads:[~2022-11-24 0:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 8:18 [PATCH bpf v2] bpf: Update bpf_{g,s}etsockopt() documentation Ji Rongfeng
2022-11-24 0:18 ` Daniel Borkmann
2022-11-24 0:40 ` Martin KaFai Lau [this message]
2022-11-27 3:27 ` Ji Rongfeng
[not found] ` <7ede0b02-6fe6-f51e-eb3c-bf6dab63aa21@outlook.com>
2022-11-29 14:14 ` Ji Rongfeng
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=6fbd8c35-04de-c379-5062-a0b9d4a8ebbe@linux.dev \
--to=martin.lau@linux.dev \
--cc=SikoJobs@outlook.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=joannelkoong@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuifeng@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=maximmi@nvidia.com \
--cc=quentin@isovalent.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.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