Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3694613rdh; Thu, 28 Sep 2023 22:26:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHESqUmC9aEPuagcEd3tXFQk/fkOf1lilDdw4hUIS9wsBM7TnTC91/F4CMrMYaG5JYslTuh X-Received: by 2002:a67:ffc5:0:b0:452:c729:e9df with SMTP id w5-20020a67ffc5000000b00452c729e9dfmr2893440vsq.33.1695965182793; Thu, 28 Sep 2023 22:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695965182; cv=none; d=google.com; s=arc-20160816; b=bO81Y4EdFe4t4qGKU/BcYTg0a1pHrOtgNisWCBksQkDx3Cg+z5mJYfMGwSvNT8k6L8 FC5WKQCWq9WunK2nJKzr6IXxAqjHb5xiuZdfRil0vRXavMLuW0f5RvbV5UHXWHE3e1y5 JY2apGRMUwzGMuZ62wbbZYBSfTLMZguDuWMQZX9iZ1IrY/RruZJnrA5q7Nlq8626ApGy yAQ4X5hPInm7+qbIMDx4z72HgGf//ZHPUPUUprPG4D3QeEtxClGMiV+aBzEK48UMv1Qt n9sNqa3aVRn5tLwWSMOVUr2zYChY28DM0VkJGD/3DaG28slGHRc3XUd0H8wqsYD/HXe3 zE+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=OPk2ZzrID8Ruy/e6ubyOdQXDCXqUez+jUlvGZE9CHoc=; fh=e/Sq2sZ30SOVaO+56+YLMVYx1dlEyjd5cSziYZqOkXE=; b=hazcwgV9uJhs7zxh4EP1gQynT3d6VX8qTilXM8xpiwuPLtKdabsbNtpL5VffYBlRJA 3EbdzlXflRQRBr2aeAAkQff4Phc+fn4GKy4eBQLL4OGyn4L0p1RC9R8l02uamO4aEkTE WRYXX69KTEOt2AZNFej7KLi07hjyS6zCSSjQY8Pxc7EdJoPqrsr9MMOb9gygkupqZY97 z4UuW7iwDMYbOkC1EpCHnXS90ch740awhA7CGb1a6m+l9EBF7xBF8HJyGwlSAduiSPHb qjSnXtDvxABd2eKhckuGDscIlTTy6IS/FctHYtpsm+feJW+t/Eb4YaEAIvOjR/gv8Tj1 HNBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@blackwall-org.20230601.gappssmtp.com header.s=20230601 header.b=DI6SzCmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l25-20020a635b59000000b0056c403cd155si1253546pgm.596.2023.09.28.22.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 22:26:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@blackwall-org.20230601.gappssmtp.com header.s=20230601 header.b=DI6SzCmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AED638077561; Thu, 28 Sep 2023 05:36:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232093AbjI1MgC (ORCPT + 99 others); Thu, 28 Sep 2023 08:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231752AbjI1MgA (ORCPT ); Thu, 28 Sep 2023 08:36:00 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD858180 for ; Thu, 28 Sep 2023 05:35:57 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-317c3ac7339so12317697f8f.0 for ; Thu, 28 Sep 2023 05:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20230601.gappssmtp.com; s=20230601; t=1695904556; x=1696509356; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OPk2ZzrID8Ruy/e6ubyOdQXDCXqUez+jUlvGZE9CHoc=; b=DI6SzCmC+ik1/3gGJtZaaEQEZeBEH2IzH7xEn3xfdfCkGFJnUqILygvEr79HM2pY6W n0ATXu30vKju6aYcfvas+ex9CBs/pyIN90PELqPIYlKxbx12rqdqFSJ2nJFM7aiHCNYX ld/UMYHGLcsR2veCA1tEFrzC1YBJyn/nxygpi/vmC3sAdVtyyzNwydlxlZdrd4JNdYXB uRapu+NpaTRv7Zu2FRiMV1Xwess9RIjl9oIGvWlsyWA32PJVa2ScA+KDlqjOd0wk8+Lc sswWC1nEhS0ZmnKdMj83SoMJRbMjdTnxC9rDg0BUB0forlhaNErN7d2+kuOvIteyFuVq qrYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695904556; x=1696509356; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OPk2ZzrID8Ruy/e6ubyOdQXDCXqUez+jUlvGZE9CHoc=; b=F1xJYpDh2EvttVsKfP8/0a48ybeP0K41wbH4yhYIBF6FanMc7PS+9WvSBfHs2+RRRC 4ZbNxE2sKnpC/dYc3bR7gsBJk89HKVmSlCCfKz8InObkKXEiUwXV0eecFMEwt1ux/Aj/ M5W4BTXXByJAiBoCFUrClV1lM60LvmzRR12qb+13kA8hebbjI2u8U8eh7iE107YpkJiT KvxL071+N6O52mQLhp4z6VMrDecQE4QYVRQI0TxYIM3h8jQhv8SrZ9Byhg29exbm1HnM 4Jv+iHeys1arg7KnFyVihzV+3p458M3KfrEiURzU4sAKkGzYZBK/79a+oZhRL8UHzpl3 kV0Q== X-Gm-Message-State: AOJu0YzBvHa3KropTXgKRP1iP2/FR7OvX/47CswB//dkgW5EG67c3nOK hsr1zYT8A1PYlto0UVBe5HAgkzEUc5kRfPoYly7WUg== X-Received: by 2002:a05:6000:985:b0:320:9e7:d525 with SMTP id by5-20020a056000098500b0032009e7d525mr1391079wrb.46.1695904555860; Thu, 28 Sep 2023 05:35:55 -0700 (PDT) Received: from [192.168.0.105] (haunt.prize.volia.net. [93.72.109.136]) by smtp.gmail.com with ESMTPSA id iw7-20020a05600c54c700b003fc16ee2864sm18319287wmb.48.2023.09.28.05.35.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Sep 2023 05:35:55 -0700 (PDT) Message-ID: <2c985516-88a3-9fee-dbd1-134aecd323e5@blackwall.org> Date: Thu, 28 Sep 2023 15:35:53 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] bridge: MTU auto tuning ignores IFLA_MTU on NEWLINK Content-Language: en-US From: Nikolay Aleksandrov To: Trent Lloyd , Roopa Prabhu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20230927075713.1253681-1-trent.lloyd@canonical.com> <3dccacd8-4249-87f8-690c-6083374dc9d1@blackwall.org> In-Reply-To: <3dccacd8-4249-87f8-690c-6083374dc9d1@blackwall.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 28 Sep 2023 05:36:08 -0700 (PDT) On 9/27/23 11:10, Nikolay Aleksandrov wrote: > On 9/27/23 10:57, Trent Lloyd wrote: >> Commit 804b854d374e ("net: bridge: disable bridge MTU auto tuning if it >> was set manually") disabled auto-tuning of the bridge MTU when the MTU >> was explicitly set by the user, however that would only happen when the >> MTU was set after creation. This commit ensures auto-tuning is also >> disabled when the MTU is set during bridge creation. >> >> Currently when the br_netdev_ops br_change_mtu function is called, the >> flag BROPT_MTU_SET_BY_USER is set. However this function is only called >> when the MTU is changed after interface creation and is not called if >> the MTU is specified during creation with IFLA_MTU (br_dev_newlink). >> >> br_change_mtu also does not get called if the MTU is set to the same >> value it currently has, which makes it difficult to work around this >> issue (especially for the default MTU of 1500) as you have to first >> change the MTU to some other value and then back to the desired value. >> > > Yep, I think I also described this in the commit message of my patch. > >> Add new selftests to ensure the bridge MTU is handled correctly: >>   - Bridge created with user-specified MTU (1500) >>   - Bridge created with user-specified MTU (2000) >>   - Bridge created without user-specified MTU >>   - Bridge created with user-specified MTU set after creation (2000) >> >> Regression risk: Any workload which erroneously specified an MTU during >> creation but accidentally relied upon auto-tuning to a different value >> may be broken by this change. >> > > Hmm, you're right. There's a risk of regression. Also it acts > differently when set to 1500 as you've mentioned. I think they should > act the same, also bridge's fake rtable RTAX_MTU is not set. > >> Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2034099 >> Fixes: 804b854d374e ("net: bridge: disable bridge MTU auto tuning if >> it was set manually") >> Signed-off-by: Trent Lloyd >> --- > So I've been thinking about this and to elaborate - my concerns are two first is inconsistency between setting MTU at create vs later when it's the default (i.e. this way disables auto-tuning, while later it doesn't) and second is potential breakage as some network managers always set the mtu when creating devices. That would suddenly start disabling auto-tuning and that will surprise some people which expect it to work. I think if you make them both act the same and leave out that case with a big comment why, this would be good for -net. To fully solve the problem without breaking anyone I think we should add control over the autotuning flag so it can be turned on/off by the users. That would be explicit and will work for all cases, but that is net-next material. Thanks, Nik