public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: one-d-wide@protonmail.com
Cc: Jakub Kicinski <kuba@kernel.org>,
	phil@nwl.cc, netfilter-devel@vger.kernel.org,
	netdev@vger.kernel.org, pablo@netfilter.org,
	coreteam@netfilter.org, fw@strlen.de, donald.hunter@gmail.com
Subject: Re: [net-next,v7,5/5] doc/netlink: nftables: Fill out operation attributes
Date: Mon,  2 Feb 2026 19:19:05 -0800	[thread overview]
Message-ID: <20260203031905.934693-1-kuba@kernel.org> (raw)
In-Reply-To: <20260202093928.742879-6-one-d-wide@protonmail.com>

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.

For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
doc/netlink: nftables: Fill out operation attributes

This commit fills out the operation attributes for 31 nftables netlink
operations, documenting which attributes are used in request and reply
messages based on kernel implementation.

> diff --git a/Documentation/netlink/specs/nftables.yaml b/Documentation/netlink/specs/nftables.yaml
> index ced567e7a521..5a9d8727a8cb 100644
> --- a/Documentation/netlink/specs/nftables.yaml
> +++ b/Documentation/netlink/specs/nftables.yaml

[ ... ]

> @@ -1612,7 +1626,23 @@ operations:
>          request:
>            value: 0xa03
>            attributes:
> +            # Mentioned in nf_tables_newchain()
> +            - table
> +            - handle
> +            - policy
> +            - flags
> +            # Mentioned in nf_tables_updchain()
> +            - hook
>              - name
> +            - counters
> +            - policy
> +            # Mentioned in nf_tables_addchain()
> +            - hook
> +            - name
> +            - counters
> +            - userdata
> +            # Mentioned in nft_chain_parse_hook()
> +            - type

Does this attribute list contain duplicates? The list shows:
- 'policy' twice (lines 1632 and 1638)
- 'hook' twice (lines 1635 and 1640)
- 'name' twice (lines 1636 and 1641)
- 'counters' twice (lines 1637 and 1642)

While the comments indicate these attributes are referenced by different
kernel functions, the YAML specification should document the unified netlink
interface where each attribute appears at most once per message. Having
duplicates may confuse code generation tools that parse this specification.

Should each attribute be listed only once, with implementation details
documented separately if needed?

[ ... ]

> @@ -1717,7 +1798,24 @@ operations:
>          request:
>            value: 0xa09
>            attributes:
> +            # Mentioned in nf_tables_newset()
> +            - table
>              - name
> +            - key-len
> +            - id
> +            - key-type
> +            - key-len
> +            - flags
> +            - data-type
> +            - data-len
> +            - obj-type
> +            - timeout
> +            - gc-interval
> +            - policy
> +            - desc
> +            - table
> +            - name
> +            - userdata

Are there duplicates in this attribute list? Looking at the newset
operation's request attributes:
- 'table' appears twice (lines 1802 and 1816)
- 'name' appears twice (lines 1803 and 1817)
- 'key-len' appears twice (lines 1804 and 1807)

In netlink messages, attributes are identified by their type ID, and each
should appear at most once in the specification. Should these duplicates
be removed?

      reply	other threads:[~2026-02-03  3:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02  9:40 [PATCH net-next v7 0/5] doc/netlink: Expand nftables specification Remy D. Farley
2026-02-02  9:40 ` [PATCH net-next v7 1/5] doc/netlink: netlink-raw: Add max check Remy D. Farley
2026-02-02  9:40 ` [PATCH net-next v7 2/5] doc/netlink: nftables: Add definitions Remy D. Farley
2026-02-03  9:04   ` Donald Hunter
2026-02-02  9:41 ` [PATCH net-next v7 3/5] doc/netlink: nftables: Update attribute sets Remy D. Farley
2026-02-03  3:19   ` [net-next,v7,3/5] " Jakub Kicinski
2026-02-02  9:41 ` [PATCH net-next v7 4/5] doc/netlink: nftables: Add sub-messages Remy D. Farley
2026-02-02  9:41 ` [PATCH net-next v7 5/5] doc/netlink: nftables: Fill out operation attributes Remy D. Farley
2026-02-03  3:19   ` Jakub Kicinski [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=20260203031905.934693-1-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=coreteam@netfilter.org \
    --cc=donald.hunter@gmail.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=one-d-wide@protonmail.com \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    /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