From: Jakub Kicinski <kuba@kernel.org>
To: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@intel.com>,
Jonathan Corbet <corbet@lwn.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"edumazet@google.com" <edumazet@google.com>,
"chuck.lever@oracle.com" <chuck.lever@oracle.com>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next] tools: ynl-gen: generate docs for <name>_max/_mask enums
Date: Wed, 14 Jun 2023 21:17:15 -0700 [thread overview]
Message-ID: <20230614211715.01940bbd@kernel.org> (raw)
In-Reply-To: <DM6PR11MB4657A5F161476B05C5F8B7569B5AA@DM6PR11MB4657.namprd11.prod.outlook.com>
On Wed, 14 Jun 2023 22:11:38 +0000 Kubalewski, Arkadiusz wrote:
> Thanks for pointing this, but it doesn't work :/
>
> I tried described format but still ./scripts/kernel-doc warns about it.
> Same as 'make htmldocs' does, as it uses ./scripts/kernel-doc
>
> Also, if the enum is not described in the header, the docs produced by
> the 'make htmldocs' would list the enum with the comment "undescribed".
Oh, you're right :S Looks like private: does not work for enums.
> It seems we need fixing:
> - prevent warning from ./scripts/kernel-doc, so enums marked as "private:"
> would not warn
> - generate __<ENUM_NAME>_MAX while marking them as "/* private: */"
> - add some kind of "pattern exclude" directive/mechanics for generating
> docs with sphinx
>
> Does it make sense?
> TBH, not yet sure if all above are possible..
Let's ask Jon, and wait for him to chime in, I don't think these
warnings should be a blocker for new families.
Jon, we have some "meta" entries in the uAPI enums in netlink
to mark the number of attributes, eg:
enum {
NETDEV_A_DEV_IFINDEX = 1,
NETDEV_A_DEV_PAD,
NETDEV_A_DEV_XDP_FEATURES,
/* private: */
__NETDEV_A_DEV_MAX, // this
NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1) // and this
};
Also masks of all flags like:
enum netdev_xdp_act {
NETDEV_XDP_ACT_BASIC = 1,
NETDEV_XDP_ACT_REDIRECT = 2,
NETDEV_XDP_ACT_NDO_XMIT = 4,
NETDEV_XDP_ACT_XSK_ZEROCOPY = 8,
NETDEV_XDP_ACT_HW_OFFLOAD = 16,
NETDEV_XDP_ACT_RX_SG = 32,
NETDEV_XDP_ACT_NDO_XMIT_SG = 64,
/* private: */
NETDEV_XDP_ACT_MASK = 127, // this
};
which user space should not care about.
I was hoping we can mark them as /* private: */ but that doesn't
work, when we add kdocs without documenting those - there's a warning.
Is this a known problem? Is it worth fixing?
Do we need to fix both kernel-doc and sphinx or just the former?
next prev parent reply other threads:[~2023-06-15 4:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 23:17 [PATCH net-next] tools: ynl-gen: fix nested policy attribute type Arkadiusz Kubalewski
2023-06-13 23:17 ` [PATCH net-next] tools: ynl-gen: fix NLA_POLICY_MAX on enums with value Arkadiusz Kubalewski
2023-06-13 23:17 ` [PATCH net-next] tools: ynl-gen: generate docs for <name>_max/_mask enums Arkadiusz Kubalewski
2023-06-14 0:59 ` Jakub Kicinski
2023-06-14 12:48 ` Kubalewski, Arkadiusz
2023-06-14 17:38 ` Jakub Kicinski
2023-06-14 22:11 ` Kubalewski, Arkadiusz
2023-06-15 4:17 ` Jakub Kicinski [this message]
2023-06-14 0:50 ` [PATCH net-next] tools: ynl-gen: fix nested policy attribute type Jakub Kicinski
2023-06-14 12:28 ` Kubalewski, Arkadiusz
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=20230614211715.01940bbd@kernel.org \
--to=kuba@kernel.org \
--cc=arkadiusz.kubalewski@intel.com \
--cc=chuck.lever@oracle.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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.