[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yni6nBTq+0LrBvQN@debian.me>
Date: Mon, 9 May 2022 13:54:20 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: Akira Yokosawa <akiyks@...il.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Jakub Kicinski <kuba@...nel.org>,
Ben Greear <greearb@...delatech.com>,
Pavel Begunkov <asml.silence@...il.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH net-next v3] net/core: Rephrase function description of
__dev_queue_xmit()
On Sun, May 08, 2022 at 08:48:10PM +0900, Akira Yokosawa wrote:
> So, appended below is my version of the fix with the answer to
> Stephen's question, "I am not sure why this has turned up just now."
>
> Stephen, Jakub, what do you think?
>
> Thanks, Akira
>
> ----8<--------------
> From: Akira Yokosawa <akiyks@...il.com>
> Subject: [PATCH -next] net/core: Hide __dev_queue_xmit()'s kernel-doc
>
> Commit c526fd8f9f4f21 ("net: inline dev_queue_xmit()") added
> export of __dev_queue_exit() to cope with inlining of its
> wrapper functions dev_queue_xmit() and dev_queue_xmit_accel().
> This made __dev_queue_exit()'s comment block visible to Sphinx
> processing in "make htmldocs" because
> Documentation/networking/kapi.rst has the directive of:
>
> .. kernel-doc:: net/core/dev.c
> :export:
>
> Unfortunately, the kernel-doc style comment has a number of
> issues when parsed as RestructuredText. Stephen reported a
> new warning message from "make htmldocs" caused by one of
> such issues.
>
> The leading "__" in the function name indicates that it is an
> internal API and should not be widely used.
> Exposing documentation of such a function in HTML and PDF
> documentations does not make sense.
>
Oops, I don't see that internal API marker. Maybe we can add "Only
public funtions should be added kernel-doc comments" note to
Documentation/doc-guide/kernel-doc.rst?
> For the time being, hide the kernel-doc style comment from Sphinx
> processing by removing the kernel-doc marker of "/**".
>
> Proper kernel-doc comments should be added to the inlined
> wrapper functions, which is deferred to those who are familiar
> with those netdev APIs.
>
Ah! Thanks for the explanation.
Did you mean proper kernel-doc comments should be added to the wrapper
functions that called this inlined method?
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Fixes: c526fd8f9f4f21 ("net: inline dev_queue_xmit()")
> Link: https://lore.kernel.org/linux-next/20220503073420.6d3f135d@canb.auug.org.au/
> Signed-off-by: Akira Yokosawa <akiyks@...il.com>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Pavel Begunkov <asml.silence@...il.com>
> ---
> net/core/dev.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index c2d73595a7c3..a97fd413d705 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -4085,8 +4085,7 @@ struct netdev_queue *netdev_core_pick_tx(struct net_device *dev,
> return netdev_get_tx_queue(dev, queue_index);
> }
>
> -/**
> - * __dev_queue_xmit - transmit a buffer
> +/* __dev_queue_xmit - transmit a buffer
> * @skb: buffer to transmit
> * @sb_dev: suboordinate device used for L2 forwarding offload
> *
> --
> 2.25.1
>
I'm in favor of this patch. Thanks.
--
An old man doll... just what I always wanted! - Clara
Powered by blists - more mailing lists