Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, yhs@fb.com
Subject: Re: [PATCH bpf] bpf: refer to struct xdp_md in user space comments
Date: Mon, 31 Aug 2020 17:28:52 -0600	[thread overview]
Message-ID: <27686437-0db5-5882-278c-53bdc47e866a@gmail.com> (raw)
In-Reply-To: <20200831154319.71a83484@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On 8/31/20 4:43 PM, Jakub Kicinski wrote:
> On Thu, 20 Aug 2020 16:16:47 +0200 Daniel Borkmann wrote:
>> On 8/19/20 9:27 PM, Jakub Kicinski wrote:
>>> uAPI uses xdp_md, not xdp_buff. Fix comments.
>>>
>>> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>>> ---
>>>   include/uapi/linux/bpf.h | 8 ++++----
>>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>>> index 0480f893facd..cc3553a102d0 100644
>>> --- a/include/uapi/linux/bpf.h
>>> +++ b/include/uapi/linux/bpf.h
>>> @@ -1554,7 +1554,7 @@ union bpf_attr {  
>>
>> Needs also tooling header copy, but once that is done, it needs fixup for libbpf:
>>
>> [root@pc-9 bpf]# make
>>    GEN      bpf_helper_defs.h
>> Unrecognized type 'struct xdp_md', please add it to known types!
>> make[1]: *** [Makefile:186: bpf_helper_defs.h] Error 1
>> make[1]: *** Deleting file 'bpf_helper_defs.h'
>> make: *** [Makefile:160: all] Error 2
>> [root@pc-9 bpf]#
>>
>> Pls fix up and send v2, thanks.
> 
> FWIW upon closer inspection it appears that this is intentional
> (even if confusing) and bpf_helpers_doc.py swaps the types to 
> __sk_buff and xdp_md when generating man pages and the header.
> 

I liked the direction of fixing the uapi file. Is there a legit reason
to have the documentation in uapi/linux/bpf.h to reference a struct that
is not part of the uapi?

      reply	other threads:[~2020-08-31 23:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 19:27 Jakub Kicinski
2020-08-19 20:50 ` Yonghong Song
2020-08-20 14:16 ` Daniel Borkmann
2020-08-31 22:43   ` Jakub Kicinski
2020-08-31 23:28     ` David Ahern [this message]

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=27686437-0db5-5882-278c-53bdc47e866a@gmail.com \
    --to=dsahern@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.com \
    --subject='Re: [PATCH bpf] bpf: refer to struct xdp_md in user space comments' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).