Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1875717pxb; Fri, 27 Aug 2021 21:08:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze3KxqgJuXsC0ZS3wYmmBqjtipf/Lzwq6VJx/i+K6JSf+ASm4u0d+2h7mkS+IbzabR/CpS X-Received: by 2002:a05:6402:18ec:: with SMTP id x44mr13136168edy.331.1630123706472; Fri, 27 Aug 2021 21:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630123706; cv=none; d=google.com; s=arc-20160816; b=Ud4eKb8bIC0MR44qjkFndZrqz9OPrQ4PSCWvaAcJ/i63X/gkzyPYEVHVZutcpoGnsl i7hGmGRl7U1Ar4x6SBqSs2/gonFgqB9E069OmPauCJjm+GjLXAQl6FFWuj7d1aF9VqVB k/RpP4KLmrbiQEbi3S4LCjHY7+I6joA6VDS5KmbD4B3J0BC0L3iOrbN2oMqWCuWsouB/ G4XBGueE95lb5nFqTVvKeSmcCeqGK6u9aUFGCfhHZWdcDyUH60kKF5KBQBMOAEQ343Wp 6Bcb7I1L80rty3CGWoMf1id/CVE5MF4WOUSniwtARz0CHphTG2vstomyKWJysDE6ZtJk md4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=EZiVpwQTvY18aD9a7OhYl1XQwft6lQ0VpcQLv7VzVhU=; b=KIdivBr7mxigrjZdk+cdnl+pZjfuH88swkMIlpF2UCvB6xH0mxS/LnYLs4clEyUE6c 0ndc0ArpnIIoZDshpWg1vKiyPeVxhGRlwaF4a8oxiciPKw8jqJVZhCwPOHUWvwapmveB dku/ruwn9q+bMt49PkTcXwT2dDur8NyuCPw0o0rtNl6rYvTO+mIjKccw5VyiLpQoyeW/ hxssa5J7QJcasdSGqadyrVnMO2cdA7dBuFe4isq27kecyIOm8zJee8zBSF7otTp+LQzk 7xvnip2f4FEvxccfh8gu0tYphZ0/SKnqcCBuemMNuTo93p0ARmwQqIwxPeQInpgLjZ3n b4OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SmW4tzyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n26si8348795edv.112.2021.08.27.21.07.58; Fri, 27 Aug 2021 21:08:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SmW4tzyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229798AbhH1EHW (ORCPT + 99 others); Sat, 28 Aug 2021 00:07:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:35000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbhH1EHV (ORCPT ); Sat, 28 Aug 2021 00:07:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E1DDD60F44; Sat, 28 Aug 2021 04:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630123591; bh=dIBeOi1GGKjlDfEsJVaGO8duIxg15L1z3VVcvy4vXzE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SmW4tzyXz+NvXu1cKRLsrojCzh5PwOcGfKfayoE2RN80DPEOehNEQ8jG4NgBJgK+w ZO7+DiLMd/KKcbniBeJkHNR5qXZhvE/KZ2owroHZfpa3wvWBOen6YGgMbUJ1Pg5Dyp BxxbTNK0Zl8CPmw7rL9ME50i0AvM/RlxdnrNQx6+Alx+xjH93FkVsNshG4KEFFJCZT twmxXgk9P5FVx87iPyLmqm+PbpcSwUaGhPmDWYDz1Y9b9b3g9KWnNME4BAnxfuK9iR 1wpoyZx3yuy7ishYDCN4eYb2MQg/xRXQThgw+b3/OE/hGWyTNndNQK5jGY0bVO9u+S rUM413WD/8bhA== Date: Fri, 27 Aug 2021 21:06:29 -0700 From: Jakub Kicinski To: David Ahern , Rocco Yue Cc: "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Matthias Brugger , 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 Message-ID: <20210827210629.6858ceb9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <88523c38-f0b4-8a63-6ca6-68a3122bef79@gmail.com> References: <20210827150412.9267-1-rocco.yue@mediatek.com> <88523c38-f0b4-8a63-6ca6-68a3122bef79@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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//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//mtu) is > > updeated, mtu6 (/proc/sys/net/ipv6/conf//mtu) will > > be updated to the value of interface mtu; > > (2) mtu6 (/proc/sys/net/ipv6/conf//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 > > Reviewed-by: David Ahern Applied, thank you!