BPF List
 help / color / mirror / Atom feed
From: Quentin Monnet <quentin@isovalent.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
	Joanne Koong <joannelkoong@gmail.com>,
	bpf@vger.kernel.org
Cc: andrii@kernel.org, ast@kernel.org
Subject: Re: [PATCH bpf-next v1] bpf: fix bpf_skb_pull_data documentation
Date: Fri, 15 Jul 2022 14:50:50 +0100	[thread overview]
Message-ID: <e167c21e-c448-634c-992f-141bbcdf637d@isovalent.com> (raw)
In-Reply-To: <43bbdc5a-000d-0aed-f325-2b942aa1fc02@iogearbox.net>

On 15/07/2022 14:43, Daniel Borkmann wrote:
> On 7/15/22 12:47 AM, Joanne Koong wrote:
>> Fix documentation for bpf_skb_pull_data() helper for
>> when flags == 0.
>>
>> Fixes: fa15601ab31e ("bpf: add documentation for eBPF helpers (33-41)")
>> Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
>> ---
>>   include/uapi/linux/bpf.h       | 3 ++-
>>   tools/include/uapi/linux/bpf.h | 3 ++-
>>   2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>> index 379e68fb866f..a80c1f6bbe25 100644
>> --- a/include/uapi/linux/bpf.h
>> +++ b/include/uapi/linux/bpf.h
>> @@ -2361,7 +2361,8 @@ union bpf_attr {
>>    *         Pull in non-linear data in case the *skb* is non-linear
>> and not
>>    *         all of *len* are part of the linear section. Make *len*
>> bytes
>>    *         from *skb* readable and writable. If a zero value is
>> passed for
>> - *         *len*, then the whole length of the *skb* is pulled.
>> + *        *len*, then all bytes in the head of the skb will be made
>> readable
> 
> Quentin, should the formatting be '*skb*' instead of 'skb'?

Correct

> Maybe it's more clear if we speak of 'all bytes in the linear part'
> instead of 'all
> bytes in the head' of the skb to make it clearer? Either is ok with me
> though.

Good suggestion, “linear part” is maybe easier to understand given that
the paragraph has no other mention the “head”.

Would it be worth, even, linking to e.g. Dave's doc
(http://vger.kernel.org/~davem/skb.html) here, to provide more details?
People reading the header file may not need that, but folks reading the
generated man page may not be aware of what a skb contains.

Quentin


  reply	other threads:[~2022-07-15 13:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 22:47 [PATCH bpf-next v1] bpf: fix bpf_skb_pull_data documentation Joanne Koong
2022-07-14 23:14 ` Joanne Koong
2022-07-15  8:51   ` Quentin Monnet
2022-07-15 13:43 ` Daniel Borkmann
2022-07-15 13:50   ` Quentin Monnet [this message]
2022-07-15 17:44     ` Joanne Koong

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=e167c21e-c448-634c-992f-141bbcdf637d@isovalent.com \
    --to=quentin@isovalent.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=joannelkoong@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