From: Andrea Mayer <andrea.mayer@uniroma2.it>
To: Gabriel Goller <g.goller@proxmox.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Hangbin Liu <hangbin.liu@linux.dev>,
stefano.salsano@uniroma2.it,
Andrea Mayer <andrea.mayer@uniroma2.it>
Subject: Re: [PATCH net-next v5] net: ipv6: seg6: report lwtunnel setup errors via extack
Date: Tue, 13 Oct 2026 18:04:17 +0200 [thread overview]
Message-ID: <20261013180417.0647d60d8a95d2af01367da9@uniroma2.it> (raw)
In-Reply-To: <20261009152015.462383-1-g.goller@proxmox.com>
On Fri, 9 Oct 2026 17:20:13 +0200
Gabriel Goller <g.goller@proxmox.com> wrote:
Hi Gabriel,
thanks for the v5.
> seg6_build_state() rejected invalid configurations with a generic -EINVAL,
> so "ip route add ... encap seg6 ..." sometimes reported "Invalid argument".
>
> Add extack messages to the checks that lacked one, and use
> NL_REQ_ATTR_CHECK() for the missing SRH attribute so that userspace can
> tell which attribute is missing. The checks themselves and their return
> values are unchanged.
>
> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
> ---
>
> v5 (https://lore.kernel.org/all/20261005140637.644840-1-g.goller@proxmox.com/):
> * use NL_REQ_ATTR_CHECK() for the missing SRH attribute (Jakub)
> * reword the inline mode message to "inline mode requires the IPv6
> address family", since it also applies to IPv4 nexthop objects
> (Andrea)
> * consistently call the header "IPv6 Segment Routing Header" (RFC 8754)
> in all messages (Andrea)
> * include the offending mode value in the invalid mode message
> * reword the commit message to match
>
> v4 (https://lore.kernel.org/all/20260923120228.172643-1-g.goller@proxmox.com/):
> * use NL_SET_ERR_MSG when the SRH attr is missing
> * use NL_SET_ERR_MSG_ATTR when we have an invalid attr
>
> v3 (https://lore.kernel.org/all/20260922090851.38978-1-g.goller@proxmox.com/):
> * format fix
> * use NL_SET_ERR_MSG_ATTR
>
> v2 (https://lore.kernel.org/all/20260918153544.1178884-1-g.goller@proxmox.com/):
> * dropped tests
>
> net/ipv6/seg6_iptunnel.c | 26 +++++++++++++++++++++-----
> 1 file changed, 21 insertions(+), 5 deletions(-)
>
> [snip]
> default:
> + NL_SET_ERR_MSG_ATTR_FMT(extack, tb[SEG6_IPTUNNEL_SRH],
> + "invalid SRv6 encapsulation mode %d",
> + tuninfo->mode);
> return -EINVAL;
A small nit on this one, as it is new in v5: I would have kept the
v4 text here, "invalid SRv6 encapsulation mode". No need for a new
version just for this.
Reviewed-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Thanks,
Andrea
prev parent reply other threads:[~2026-10-13 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 15:20 Gabriel Goller
2026-10-13 6:14 ` Hangbin Liu
2026-10-13 16:04 ` Andrea Mayer [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=20261013180417.0647d60d8a95d2af01367da9@uniroma2.it \
--to=andrea.mayer@uniroma2.it \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=g.goller@proxmox.com \
--cc=hangbin.liu@linux.dev \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stefano.salsano@uniroma2.it \
/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
all inboxes | Powered by JetHome®