Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4429641pxb; Mon, 21 Feb 2022 21:21:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzleWLbkNNZYo6AnZJi6wguVqRtmcPv5sTCAHYWOWd41ah/WYSeGC0t5jqib18Ipoqo+/qB X-Received: by 2002:a17:902:cf05:b0:14d:5249:3b1f with SMTP id i5-20020a170902cf0500b0014d52493b1fmr21516607plg.135.1645507290099; Mon, 21 Feb 2022 21:21:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645507290; cv=none; d=google.com; s=arc-20160816; b=YaZQyXGVqkTTfXFzspC3lvNbJ05dbJtTKS6Ndme4Pp7+0k9ktZTo+wLhL+/HJFLPtf s87hODURAedY02j32+oUwoAwboXXifMmlHjI6ANKVRQuLs2eQ+1EwT8iRi06QER8H3qO V3OW+5dqFcachSYJabu/g2GLUF+AB/enH9u4fhUzRHkWDZdbwUf4gxkGf7YgflOjQH6Q N91n+XTCmg6KnGcuVfJPPIH8DkYRotHpHa7cBmSs7/wXZB72r6rpRDYIBWM2dffjWSZl 1wS2a38mZ40INi4wosDx4UI8W8qI/+0KBmLgxS0GUxYIlpoHouLWHDoPdYgNqKVKveeA Jnag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=t6kbFEJd/FB0ApOuzcw4W8u4K+JrEG/D6zZAXzwrkvw=; b=HuiFQ8d2g7xXf+yfFO0vDIs2PYxW2SNvNL4Cq17GggI3yIAK86B4KWavEK4ocrY9Ht uh0Dt5G/Lo1KOMt6FKcjgeq/WISNZIZ0HBFbVJgAgZ7Rryv7N1Pl6idw4WZxfFIsZK2s LTgGLe/ccAguzaFivtMlt6C0BRMDfjNYpn5q4uDsgsLs7J7ieX0AFz8VnINK9MWuT6bN GGIXwKoJOcjTZXlLisXxRf27AHw697Q4Ka8vGtE1zKWNnaWqJV+V0RWrZUhK6KuejEXd xhcIcP44Vo8NESbaJrWW7D069KckxMMhz2P2kNeqilrxImZtUwGzV5fzP728XsRpkscg v/JA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z9si21005088pgu.353.2022.02.21.21.21.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:21:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 86461F5434; Mon, 21 Feb 2022 20:52:36 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbiBVCGe (ORCPT + 99 others); Mon, 21 Feb 2022 21:06:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbiBVCGc (ORCPT ); Mon, 21 Feb 2022 21:06:32 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAAAF240B2; Mon, 21 Feb 2022 18:06:06 -0800 (PST) Received: from canpemm500006.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4K2jD55nzbzdZPq; Tue, 22 Feb 2022 10:04:53 +0800 (CST) Received: from [10.174.179.200] (10.174.179.200) by canpemm500006.china.huawei.com (7.192.105.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 22 Feb 2022 10:06:03 +0800 Subject: Re: [PATCH net] net: vlan: allow vlan device MTU change follow real device from smaller to bigger To: Herbert Xu , Eric Dumazet CC: David Miller , Jakub Kicinski , netdev , Vasily Averin , Kees Cook , LKML References: <20220221124644.1146105-1-william.xuanziyang@huawei.com> From: "Ziyang Xuan (William)" Message-ID: <8248d662-8ea5-7937-6e34-5f1f8e19190f@huawei.com> Date: Tue, 22 Feb 2022 10:06:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.200] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500006.china.huawei.com (7.192.105.130) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mon, Feb 21, 2022 at 07:43:18AM -0800, Eric Dumazet wrote: >> >> Herbert, do you recall why only a decrease was taken into consideration ? > > Because we shouldn't override administrative settings of the MTU > on the vlan device, unless we have to because of an MTU reduction > on the underlying device. > > Yes this is not perfect if the admin never set an MTU to start with > but as we don't have a way of telling whether the admin has or has > not changed the MTU setting, the safest course of action is to do > nothing in that case. If the admin has changed the vlan device MTU smaller than the underlying device MTU firstly, then changed the underlying device MTU smaller than the vlan device MTU secondly. The admin's configuration has been overridden. Can we consider that the admin's configuration for the vlan device MTU has been invalid and disappeared after the second change? I think so. > > Thanks, >