From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 688EBC4338F for ; Mon, 2 Aug 2021 03:46:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FC9161040 for ; Mon, 2 Aug 2021 03:46:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2FC9161040 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+UqWuxpQetvNKUCzCi3xl6rIoPfljj7Cfsmu0GA8ZfQ=; b=s1CaQtTh0C6ErA gnSg5fYRhBiSND9iuDWNzWhye2vBvoAJt2oje/r8JtCJEFe2xXuTzkWnMJzaCJE7oDj+LiMGgqwAj T8XICINzBdkk8mG3YMnn5jNo/wu9sU1BkmsqYUW7yphp9a95ZlGe+iy5RIzIb/EONocKVn/KzbG54 xla0VYULxFlM203k3rZWkVj6CoITTIjNA1Mf+Xgo87aFBOZrF3LBvTftgc8HQv4fQyUjiH8krgdO5 NpH1qx54ZDjK+mGGxxii3RjpDBDNNidtHZNlzi+vvr1hH/Ry2kMe9F5RiggfUBd5zacikFZ+pQzgE qpQcsJZ3o5b6ncxuBFPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAOs0-00ErXM-MK; Mon, 02 Aug 2021 03:44:04 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAOrx-00ErWb-EX; Mon, 02 Aug 2021 03:44:02 +0000 X-UUID: fdbdc411b7c64042aac401da6ab0dde5-20210801 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ZK3e9Sg7ghuyh77VEHKTRyGoBtj/73rumt2QQW4OnHM=; b=I1sTjCKmkm3Pr3FQlnuF3fvH+3ffvbvnfU5jGUKMMyBKeEdvjbffWFmT0UgOc54aN3XB7mcpmbzdf9zdyu+YuZEAVI6qqmyHdgzzoMPKPRmvbbSD5UkRGPBsZDEaGvxPLXYQDRA3yioZUN31DLcaQpYvdULWrdjJh7q5kQuNep0=; X-UUID: fdbdc411b7c64042aac401da6ab0dde5-20210801 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1302458776; Sun, 01 Aug 2021 20:43:58 -0700 Received: from MTKMBS32N1.mediatek.inc (172.27.4.71) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 1 Aug 2021 20:35:56 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by MTKMBS32N1.mediatek.inc (172.27.4.71) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 2 Aug 2021 11:35:49 +0800 Received: from localhost.localdomain (10.15.20.246) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 2 Aug 2021 11:35:48 +0800 From: Rocco Yue To: David Ahern CC: "David S . Miller" , Jakub Kicinski , Hideaki YOSHIFUJI , , , , , , , , Rocco Yue Subject: Re: [PATCH net-next v2] ipv6: add IFLA_INET6_RA_MTU to expose mtu value in the RA message Date: Mon, 2 Aug 2021 11:19:24 +0800 Message-ID: <20210802031924.3256-1-rocco.yue@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <5be90cf4-f603-c2f2-fd7e-3886854457ba@gmail.com> References: <5be90cf4-f603-c2f2-fd7e-3886854457ba@gmail.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 717DC6BBB0EEBCBF51C02B29FAF02E489CDAC93F80059C78A30F86F824E5FC2D2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210801_204401_541119_2E1379FF X-CRM114-Status: GOOD ( 20.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 2021-07-31 at 11:17 -0600, David Ahern wrote: On 7/30/21 7:52 PM, Rocco Yue wrote: >> 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 space process can read ra_mtu to get >> the mtu value carried in the RA message without worrying >> about the issue of ipv4 being stuck due to the late arrival >> of RA message. After comparing the value of ra_mtu and ipv4 >> mtu, then the device can use the lower MTU value for both >> IPv4 and IPv6. > > you are storing the value and sending to userspace but never using it > when sending a message. What's the pointing of processing the MTU in the > RA if you are not going to use it to control message size? Hi David, In the requirement of mobile operator at&t in 2021: AT&T Prioritize Lower MTU value: If the MTU values that the device receives from the network in the PCO IPv4 and the RA IPv6 procedures are different, then the device shall use the lower MTU value for both IPv4 and IPv6. And in the 3GPP 23.060: The PDP PDUs shall be routed and transferred between the MS and the GGSN or P-GW as N-PDUs. In order to avoid IP layer fragmentation between the MS and the GGSN or P-GW, the link MTU size in the MS should be set to the value provided by the network as a part of the IP configuration. This applies to both IPv6 and IPv4. That means user needs to be able to correctly read the mtu value carried in the RA message so that user can correctly compare PCO ipv4 mtu and RA ipv6 mtu. >> @@ -5761,6 +5765,7 @@ static int inet6_set_iftoken(struct inet6_dev *idev, struct in6_addr *token, >> static const struct nla_policy inet6_af_policy[IFLA_INET6_MAX + 1] = { >> [IFLA_INET6_ADDR_GEN_MODE] = { .type = NLA_U8 }, >> [IFLA_INET6_TOKEN] = { .len = sizeof(struct in6_addr) }, >> + [IFLA_INET6_RA_MTU] = { .type = NLA_U32 }, >> }; >> >> static int check_addr_gen_mode(int mode) > > Its value is derived from an RA not set by userspace, so set the type to > NLA_REJECT so that inet6_validate_link_af will reject messages that have > IFLA_INET6_RA_MTU set. You can set "reject_message" in the policy to > return a message that "IFLA_INET6_RA_MTU can not be set". will do. Thanks Rocco _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel