All of lore.kernel.org
 help / color / mirror / Atom feed
From: Menglong Dong <menglong8.dong@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	David Miller <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>, Martin Lau <kafai@fb.com>,
	Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Menglong Dong <imagedong@tencent.com>,
	David Ahern <dsahern@kernel.org>,
	Talal Ahmad <talalahmad@google.com>,
	Kees Cook <keescook@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH net-next 3/3] net: dropreason: reformat the comment fo skb drop reasons
Date: Sat, 28 May 2022 12:32:26 +0800	[thread overview]
Message-ID: <CADxym3ZM=eW3hNLsUuCYDfZe2F+=c_Q69YxVi9VQ_65GY2DbAQ@mail.gmail.com> (raw)
In-Reply-To: <20220527181915.6e776577@kernel.org>

On Sat, May 28, 2022 at 9:19 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Fri, 27 May 2022 15:15:22 +0800 menglong8.dong@gmail.com wrote:
> > From: Menglong Dong <imagedong@tencent.com>
> >
> > To make the code clear, reformat the comment in dropreason.h to k-doc
> > style.
> >
> > Now, the comment can pass the check of kernel-doc without warnning:
> >
> > $ ./scripts/kernel-doc -v -none include/linux/dropreason.h
> > include/linux/dropreason.h:7: info: Scanning doc for enum skb_drop_reason
> >
> > Signed-off-by: Menglong Dong <imagedong@tencent.com>
>
> I feel bad for suggesting this after you reformatted all the values
> but could we use inline notation here? With a huge enum like this
> there's a lot of scrolling between documentation and the value.
>
> /**
>  * enum skb_drop_reason - the reasons of skb drops
>  *
>  * The reason of skb drop, which is used in kfree_skb_reason().
>  * en...maybe they should be splited by group?
>  */
>  enum skb_drop_reason {
>         /**
>          * @SKB_NOT_DROPPED_YET: skb is not dropped yet (used for no-drop case)
>          */
>         SKB_NOT_DROPPED_YET = 0,
>         /** @SKB_DROP_REASON_NOT_SPECIFIED: drop reason is not specified */
>         SKB_DROP_REASON_NOT_SPECIFIED,
>         /** @SKB_DROP_REASON_NO_SOCKET: socket not found */
>         SKB_DROP_REASON_NO_SOCKET,
> ...

The inline comment is an option, which I thought of. But I found it
makes the code a little not tidy. Of course, inline comments are
easier to read. Anyway, I'll have a try and make them inline.

Thanks!
Menglong Dong

      reply	other threads:[~2022-05-28  4:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  7:15 [PATCH net-next 0/3] reorganize the code of the enum skb_drop_reason menglong8.dong
2022-05-27  7:15 ` [PATCH net-next 1/3] net: skb: move enum skb_drop_reason to standalone header file menglong8.dong
2022-05-28  1:08   ` Jakub Kicinski
2022-05-27  7:15 ` [PATCH net-next 2/3] net: skb: use auto-generation to convert skb drop reason to string menglong8.dong
2022-05-27 14:03   ` kernel test robot
2022-05-28  1:14   ` Jakub Kicinski
2022-05-28  4:26     ` Menglong Dong
2022-05-27  7:15 ` [PATCH net-next 3/3] net: dropreason: reformat the comment fo skb drop reasons menglong8.dong
2022-05-28  1:19   ` Jakub Kicinski
2022-05-28  4:32     ` Menglong Dong [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='CADxym3ZM=eW3hNLsUuCYDfZe2F+=c_Q69YxVi9VQ_65GY2DbAQ@mail.gmail.com' \
    --to=menglong8.dong@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=imagedong@tencent.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=keescook@chromium.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=pabeni@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=songliubraving@fb.com \
    --cc=talalahmad@google.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.