Netdev List
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	andrew+netdev@lunn.ch, horms@kernel.org, donald.hunter@gmail.com,
	kuniyu@google.com
Subject: Re: [PATCH net-next 3/3] netlink: specs: fou: link the type attribute to the encap-type enum
Date: Mon, 7 Sep 2026 12:05:27 +0200	[thread overview]
Message-ID: <3d441c88-65d2-4ce1-9b30-a829f84b0d16@6wind.com> (raw)
In-Reply-To: <20260904191412.3872344-4-kuba@kernel.org>

Le 04/09/2026 à 21:14, Jakub Kicinski a écrit :
> The spec defines encap-type (unspec / direct / gue), but no attribute
> references it, so the definition exists only to emit FOU_ENCAP_* into
> the uAPI header - while FOU_ATTR_TYPE is exactly that value space:
> fou_create() switches on FOU_ENCAP_DIRECT / FOU_ENCAP_GUE and returns
> -EINVAL for anything else. Python YNL could not accept or display the
> names and the generated C exposed a raw __u8 setter.
> 
> The global policy entry becomes NLA_POLICY_MAX(NLA_U8, 2). For add
> that only moves the existing fou_create() rejection earlier; del and
> get ignore FOU_ATTR_TYPE altogether, so a bogus type there now fails
> validation instead of being dropped on the floor.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Side note: the field 'type' in 'struct fou_cfg' and 'struct fou' is a u16.
Having an u8 would be more consistent (:

  reply	other threads:[~2026-09-07 10:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 19:14 [PATCH net-next 0/3] netlink: specs: fou: spec tweaks Jakub Kicinski
2026-09-04 19:14 ` [PATCH net-next 1/3] netlink: specs: fou: add af to the shared attribute list Jakub Kicinski
2026-09-07 10:04   ` Nicolas Dichtel
2026-09-07 19:14   ` netdev-bot+sashiko
2026-09-04 19:14 ` [PATCH net-next 2/3] netlink: specs: fou: local-v4 and peer-v4 are big endian Jakub Kicinski
2026-09-07 10:05   ` Nicolas Dichtel
2026-09-07 19:14   ` netdev-bot+sashiko
2026-09-08 10:56     ` Paolo Abeni
2026-09-04 19:14 ` [PATCH net-next 3/3] netlink: specs: fou: link the type attribute to the encap-type enum Jakub Kicinski
2026-09-07 10:05   ` Nicolas Dichtel [this message]
2026-09-08 11:00 ` [PATCH net-next 0/3] netlink: specs: fou: spec tweaks patchwork-bot+netdevbpf

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=3d441c88-65d2-4ce1-9b30-a829f84b0d16@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox