mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: omar@blockcast.net
Cc: ap420073@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	shuah@kernel.org, horms@kernel.org, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	willemb@google.com
Subject: Re: [PATCH net-next v5 02/12] amt: send the Relay Advertisement over IPv6
Date: Tue, 01 Dec 2026 06:46:16 +0000	[thread overview]
Message-ID: <179610757665.3146.10077245653924427699@kernel.org> (raw)
In-Reply-To: <20261130064249.1874523-3-omar@blockcast.net>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] Both the commit message and the new comment above struct
  amt_header_advertisement_v6 in include/net/amt.h ("s5.2 selects the…

--

amt: send the Relay Advertisement over IPv6

This adds struct amt_header_advertisement_v6 and
amt_send_advertisement_v6(), which send the 24-byte IPv6 form of the
Relay Advertisement. They use a new amt_send_ctrl_v6()/amt_route6() pair
built on udp_tunnel6_xmit_skb(). On an IPv6 device, amt_discovery_handler()
answers a Discovery with this form, sent from the address the Discovery
was sent to; amt_v6() is still false for every device, so there is no
functional change yet.

> diff --git a/include/net/amt.h b/include/net/amt.h
> index ca35782f8d3a2..52d77bc6b4193 100644
> --- a/include/net/amt.h
> +++ b/include/net/amt.h
> @@ -133,6 +133,27 @@ struct amt_header_advertisement {
>  	__be32	ip4;
>  } __packed;
>  
> +/* The IPv6 form of the Relay Advertisement (RFC 7450 s5.1.2): the same
> + * header and nonce, followed by a 16-byte relay address. s5.2 selects the
> + * form from the IP version of the outer header, not from a field in the
> + * message, so it is a type of its own.
> + */

[Severity: Low]
Is this an accurate reading of RFC 7450?

As far as I can tell, section 5.1.2.1 says the Relay Address field holds
either an IPv4 or an IPv6 address, and the length of the Advertisement
tells you which. Section 5.2 is about gateway operation. It doesn't seem
to tie the Advertisement family to the outer header version.

The commit message makes the same claim:

    ... and s5.2 selects the form from the IP
    version of the outer header rather than from a field in the message.
    An amt relay on an IPv6 outer transport therefore has to answer with
    the 24-byte IPv6 form.

So does the new comment in amt_discovery_handler():

    /* The Advertisement takes the form of the outer IP version, and
     * RFC 7450 s5.1.2 sources it from the address the Discovery was
     ...

A later patch in this series, "amt: receive the AMT gateway control plane
over IPv6", describes it differently in amt_advertisement_handler():

    /* The two forms differ only in their length. An IPv6 device's family
     * picks one, so a message of the other form is not accepted; an IPv4
     * device keeps the minimum-length check it always had.
     */

That comment reads as though length is what tells the two forms apart,
and matching the Advertisement family to the device's outer family is a
choice this driver makes.

The code looks fine. Could this header comment, the comment in
amt_discovery_handler() and the commit message describe this as driver
policy rather than something RFC 7450 s5.2 requires?

> +struct amt_header_advertisement_v6 {

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130064249.1874523-1-omar%40blockcast.net

  reply	other threads:[~2026-12-01  6:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  6:42 [PATCH net-next v5 00/12] amt: add an IPv6 outer transport Omar Ramadan
2026-11-30  6:42 ` [PATCH net-next v5 01/12] amt: create an AF_INET6 encapsulation socket for an IPv6 outer address Omar Ramadan
2026-11-30  6:42 ` [PATCH net-next v5 02/12] amt: send the Relay Advertisement over IPv6 Omar Ramadan
2026-12-01  6:46   ` netdev-bot+sashiko [this message]
2026-11-30  6:42 ` [PATCH net-next v5 03/12] amt: key relay tunnels on a union amt_addr endpoint Omar Ramadan
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:42 ` [PATCH net-next v5 04/12] amt: send the Membership Query over IPv6 Omar Ramadan
2026-11-30  6:42 ` [PATCH net-next v5 05/12] amt: forward multicast data " Omar Ramadan
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:42 ` [PATCH net-next v5 06/12] amt: size the encapsulation headroom by the outer IP version Omar Ramadan
2026-11-30  6:42 ` [PATCH net-next v5 07/12] amt: send the AMT gateway control plane over IPv6 Omar Ramadan
2026-11-30  6:42 ` [PATCH net-next v5 08/12] amt: receive " Omar Ramadan
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:42 ` [PATCH net-next v5 09/12] amt: add netlink attributes for an IPv6 outer transport Omar Ramadan
2026-11-30  6:42 ` [PATCH net-next v5 10/12] MAINTAINERS: amt: cover the amt headers and selftests Omar Ramadan
2026-11-30  6:42 ` [PATCH net-next v5 11/12] selftests: net: add amt_v6.sh for an IPv6 outer transport Omar Ramadan
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:42 ` [PATCH net-next v5 12/12] selftests: net: add amt_gw_v6.sh for the IPv6 netlink attributes Omar Ramadan
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30 17:27 ` [PATCH net-next v5 00/12] amt: add an IPv6 outer transport Matthieu Baerts
2026-12-01  8:48   ` Matthieu Baerts

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=179610757665.3146.10077245653924427699@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ap420073@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=omar@blockcast.net \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=willemb@google.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

all inboxes | Powered by JetHome®