All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: David Ahern <dsahern@gmail.com>, Rocco Yue <rocco.yue@mediatek.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, rocco.yue@gmail.com,
	chao.song@mediatek.com, zhuoliang.zhang@mediatek.com
Subject: Re: [PATCH net-next v6] ipv6: add IFLA_INET6_RA_MTU to expose mtu value
Date: Fri, 27 Aug 2021 21:06:29 -0700	[thread overview]
Message-ID: <20210827210629.6858ceb9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <88523c38-f0b4-8a63-6ca6-68a3122bef79@gmail.com>

On Fri, 27 Aug 2021 09:41:53 -0700 David Ahern wrote:
> On 8/27/21 8:04 AM, Rocco Yue wrote:
> > The kernel provides a "/proc/sys/net/ipv6/conf/<iface>/mtu"
> > file, which can temporarily record the mtu value of the last
> > received RA message when the RA mtu value is lower than the
> > interface mtu, but this proc has following limitations:
> > 
> > (1) when the interface mtu (/sys/class/net/<iface>/mtu) is
> > updeated, mtu6 (/proc/sys/net/ipv6/conf/<iface>/mtu) will
> > be updated to the value of interface mtu;
> > (2) mtu6 (/proc/sys/net/ipv6/conf/<iface>/mtu) only affect
> > ipv6 connection, and not affect ipv4.
> > 
> > Therefore, when the mtu option is carried in the RA message,
> > there will be a problem that the user sometimes cannot obtain
> > RA mtu value correctly by reading mtu6.
> > 
> > After this patch set, if a RA message carries the mtu option,
> > you can send a netlink msg which nlmsg_type is RTM_GETLINK,
> > and then by parsing the attribute of IFLA_INET6_RA_MTU to
> > get the mtu value carried in the RA message received on the
> > inet6 device. In addition, you can also get a link notification
> > when ra_mtu is updated so it doesn't have to poll.
> > 
> > In this way, if the MTU values that the device receives from
> > the network in the PCO IPv4 and the RA IPv6 procedures are
> > different, the user can obtain the correct ipv6 ra_mtu value
> > and compare the value of ra_mtu and ipv4 mtu, then the device
> > can use the lower MTU value for both IPv4 and IPv6.
> > 
> > Signed-off-by: Rocco Yue <rocco.yue@mediatek.com>
>
> Reviewed-by: David Ahern <dsahern@kernel.org>

Applied, thank you!

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: David Ahern <dsahern@gmail.com>, Rocco Yue <rocco.yue@mediatek.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, rocco.yue@gmail.com,
	chao.song@mediatek.com, zhuoliang.zhang@mediatek.com
Subject: Re: [PATCH net-next v6] ipv6: add IFLA_INET6_RA_MTU to expose mtu value
Date: Fri, 27 Aug 2021 21:06:29 -0700	[thread overview]
Message-ID: <20210827210629.6858ceb9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <88523c38-f0b4-8a63-6ca6-68a3122bef79@gmail.com>

On Fri, 27 Aug 2021 09:41:53 -0700 David Ahern wrote:
> On 8/27/21 8:04 AM, Rocco Yue wrote:
> > The kernel provides a "/proc/sys/net/ipv6/conf/<iface>/mtu"
> > file, which can temporarily record the mtu value of the last
> > received RA message when the RA mtu value is lower than the
> > interface mtu, but this proc has following limitations:
> > 
> > (1) when the interface mtu (/sys/class/net/<iface>/mtu) is
> > updeated, mtu6 (/proc/sys/net/ipv6/conf/<iface>/mtu) will
> > be updated to the value of interface mtu;
> > (2) mtu6 (/proc/sys/net/ipv6/conf/<iface>/mtu) only affect
> > ipv6 connection, and not affect ipv4.
> > 
> > Therefore, when the mtu option is carried in the RA message,
> > there will be a problem that the user sometimes cannot obtain
> > RA mtu value correctly by reading mtu6.
> > 
> > After this patch set, if a RA message carries the mtu option,
> > you can send a netlink msg which nlmsg_type is RTM_GETLINK,
> > and then by parsing the attribute of IFLA_INET6_RA_MTU to
> > get the mtu value carried in the RA message received on the
> > inet6 device. In addition, you can also get a link notification
> > when ra_mtu is updated so it doesn't have to poll.
> > 
> > In this way, if the MTU values that the device receives from
> > the network in the PCO IPv4 and the RA IPv6 procedures are
> > different, the user can obtain the correct ipv6 ra_mtu value
> > and compare the value of ra_mtu and ipv4 mtu, then the device
> > can use the lower MTU value for both IPv4 and IPv6.
> > 
> > Signed-off-by: Rocco Yue <rocco.yue@mediatek.com>
>
> Reviewed-by: David Ahern <dsahern@kernel.org>

Applied, thank you!

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: David Ahern <dsahern@gmail.com>, Rocco Yue <rocco.yue@mediatek.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, rocco.yue@gmail.com,
	chao.song@mediatek.com, zhuoliang.zhang@mediatek.com
Subject: Re: [PATCH net-next v6] ipv6: add IFLA_INET6_RA_MTU to expose mtu value
Date: Fri, 27 Aug 2021 21:06:29 -0700	[thread overview]
Message-ID: <20210827210629.6858ceb9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <88523c38-f0b4-8a63-6ca6-68a3122bef79@gmail.com>

On Fri, 27 Aug 2021 09:41:53 -0700 David Ahern wrote:
> On 8/27/21 8:04 AM, Rocco Yue wrote:
> > The kernel provides a "/proc/sys/net/ipv6/conf/<iface>/mtu"
> > file, which can temporarily record the mtu value of the last
> > received RA message when the RA mtu value is lower than the
> > interface mtu, but this proc has following limitations:
> > 
> > (1) when the interface mtu (/sys/class/net/<iface>/mtu) is
> > updeated, mtu6 (/proc/sys/net/ipv6/conf/<iface>/mtu) will
> > be updated to the value of interface mtu;
> > (2) mtu6 (/proc/sys/net/ipv6/conf/<iface>/mtu) only affect
> > ipv6 connection, and not affect ipv4.
> > 
> > Therefore, when the mtu option is carried in the RA message,
> > there will be a problem that the user sometimes cannot obtain
> > RA mtu value correctly by reading mtu6.
> > 
> > After this patch set, if a RA message carries the mtu option,
> > you can send a netlink msg which nlmsg_type is RTM_GETLINK,
> > and then by parsing the attribute of IFLA_INET6_RA_MTU to
> > get the mtu value carried in the RA message received on the
> > inet6 device. In addition, you can also get a link notification
> > when ra_mtu is updated so it doesn't have to poll.
> > 
> > In this way, if the MTU values that the device receives from
> > the network in the PCO IPv4 and the RA IPv6 procedures are
> > different, the user can obtain the correct ipv6 ra_mtu value
> > and compare the value of ra_mtu and ipv4 mtu, then the device
> > can use the lower MTU value for both IPv4 and IPv6.
> > 
> > Signed-off-by: Rocco Yue <rocco.yue@mediatek.com>
>
> Reviewed-by: David Ahern <dsahern@kernel.org>

Applied, thank you!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-08-28  4:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 15:04 [PATCH net-next v6] ipv6: add IFLA_INET6_RA_MTU to expose mtu value Rocco Yue
2021-08-27 15:04 ` Rocco Yue
2021-08-27 15:04 ` Rocco Yue
2021-08-27 16:41 ` David Ahern
2021-08-27 16:41   ` David Ahern
2021-08-27 16:41   ` David Ahern
2021-08-28  4:06   ` Jakub Kicinski [this message]
2021-08-28  4:06     ` Jakub Kicinski
2021-08-28  4:06     ` Jakub Kicinski

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=20210827210629.6858ceb9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=chao.song@mediatek.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=rocco.yue@gmail.com \
    --cc=rocco.yue@mediatek.com \
    --cc=yoshfuji@linux-ipv6.org \
    --cc=zhuoliang.zhang@mediatek.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.