Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3183089lqp; Tue, 26 Mar 2024 01:49:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVR2Sorn4Jrci0WDI468z7yyvT1DuG7MFfCcrtZytDlqHvtKDYOM+I3jOSKjBj9ZDK1rDZ6rwBg2nh014zR+s7o3XZrU9s0BCs9jxHeMA== X-Google-Smtp-Source: AGHT+IFe96TkdDI2uzu2hu03c4yvXSKxXujCAQ6//f4nS69UpxvoggCG5ufpejk8LGIJM5JhHn8c X-Received: by 2002:a05:6122:4c03:b0:4d3:4aad:22d4 with SMTP id ff3-20020a0561224c0300b004d34aad22d4mr6960799vkb.0.1711442989662; Tue, 26 Mar 2024 01:49:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711442989; cv=pass; d=google.com; s=arc-20160816; b=flF9afKtADDhAnxaio2vMUlJaIebJrqpLUADVzlwiEWvZCWU5SUOuvXmaZoSMG81k1 uQdKfVxC1Q9CJyHAobwiSXHR4xy3ZtWg/jhaDzMizfDkIgxS23L/R2jL7SIaFAzl/Ntq TIqFkm5kcgjMgYGThKmWjpsdj7RnNd5HSMUHdUAg6abgSqkTpZIrgc7mCXuWJvTrUqVM xTts3uuMcMVeCatNgEr0ijL0FSiKCxd/ccb9SV6T4tif8cAPKwVLHemP2NcPf1z0qOKd 7+32/xznolm4Br9ifNDE5meec/iUO8d9VCusO8D/I2nXgVgv4BcSLAS52Oafl+rfvEot /Gtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:autocrypt:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=djtT4ar2N3PrhGmug7K3I7GpRHozxVNMP+cK2xxicAI=; fh=1UqP6qMYjNQEIs9tauBZAsHhQfGXeXtpa/oCM68tF5c=; b=o5IvRwJfqCfKZKaLD5e6uUee93RJjZLub3+7a59L5gAxq0av7N0mcISTpyD02EFe4g t+meo5yfs5Wxr3SyB9v1ZnihO0yrmyaodOq29RuSXoi0C0V6Hd2CqeyP+66USonVMByx F3FBJcd93+drCS4sqzRN2sEN5mKoHybGujvycO5fne04gkZHU9AVy7OTGAEsc7nLvM4D 4QFm2bEjWAXtzHoh6611q5DI9qcjop/emQ/LxLvD+x5vm9Elj0wxhYXTZ7drPxP3gffX vJEMXsbPlXQ8Re3cb8+uOgDnfCfIpH4K8mYA7fgInuJ0Eb1TjNBFuCkFyNuaxpT1tcmH igrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=W6sb3PhX; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-118573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f2-20020a0562141d2200b006969b9bd12csi1021992qvd.189.2024.03.26.01.49.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 01:49:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=W6sb3PhX; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-118573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 563601C34241 for ; Tue, 26 Mar 2024 08:49:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 99A7218B04; Tue, 26 Mar 2024 08:49:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="W6sb3PhX" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04331125B9; Tue, 26 Mar 2024 08:49:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711442980; cv=none; b=WV5NaSV2ycqFLzFzeH0wVgdWhnW2qn3IQ8+5dlmmOPGNLZED5icTI936977ygIkqLBeznYNFW0hOzJ0M68EWGoJSj2WxmunFgczrvc5TQqYoxIhf+bIuuzwq7CFCTLyeq3G34wEgyZ52EDtVMVwJC9q4jTkY078Fw0rT6qZFnkA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711442980; c=relaxed/simple; bh=eK9g3rAF9QuSr1+qbKLGwZRlPMpzV7oqDZsrpXg/rcc=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=mGi7inDGJmIeNmyftf6uhBbR2voATa/CXFLl536otnk4Lec58PlLD8B2ic86AGf5a35OXIiX0Zxkpb/3xX2MxqMx4gJu2mCDknzEOrTNYmybZ+x9mKiNV4eKtfkfCw/gPy0k3JAYhZHUOfV2cwIsY9oM+1jXXHEZg7BaZcCtZWc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=W6sb3PhX; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 627A0C000F; Tue, 26 Mar 2024 08:49:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1711442961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=djtT4ar2N3PrhGmug7K3I7GpRHozxVNMP+cK2xxicAI=; b=W6sb3PhXIVN8bLR58X8VykTFD5pHWw3+DbKLLb1wx6NxXEyC+f+HARjWKuE6/eALH88Jyz wBMdTz76qQThXTMujn0lfQ1Fyo8dBXBjmNqGfn4KIG4jD4GG6R6vG/w6mAVw24jhMRgyO1 /cQTYge13rgTkhku9jBB9Uj2T3SISNa4qqBsE/tz1vWG/P+2JRsLJaIATY/UE7bBphqAV5 3VcYMvvGubz1rf24rBA35RUVeDFbTxjsxlPwAWesaU2ygGQdmJI+wttkrUKw3OCuq8RVCn +GUQ1P4b5Uw8DKVuyfZ54GKNFWybW1Vb1wx7NzEVW7lN/mAHhJT2ysOcSE16Iw== Message-ID: <277c78a696e27e77e34820ebf2f7a0d0ce5d0633.camel@bootlin.com> Subject: Re: [PATCH net-next] net: macb: allow MTU change when the interface is up From: Thomas Perrot To: Jakub Kicinski , Simon Horman Cc: Nicolas Ferre , Claudiu Beznea , "David S . Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 26 Mar 2024 09:49:19 +0100 In-Reply-To: <20240325185647.0ad674e9@kernel.org> References: <20240325152735.1708636-1-thomas.perrot@bootlin.com> <20240325205401.GF403975@kernel.org> <20240325185647.0ad674e9@kernel.org> Autocrypt: addr=thomas.perrot@bootlin.com; prefer-encrypt=mutual; keydata=mQGNBF+/ZOUBDAC2DghCjZvmgYcve02OG7dGZ7Iy58uEwne3LB7w7nRwdAxKw7ZaiVqwYO+yNGVi+GVx7oA6Wn4pv46z+QDRLQiq6OseuXhkSGCg7U/yBCUq12B/GRGO1Qt2Qi1mJJT1s+1qZ5Gxv6Nypz9qKVn94GM2bR1hXBga0t87vBpebThOHmX5d/0dqIcVxRCM7onNb0dDyRoVgLS5rBhQzrLCMrJaCy39xZUy0J1SOlH4Mgk6EhJIPYY4wlzikGX6urg+Tc9EjGd78ry0e0p5U5qgjFR5QGJDy1GnU3CfwbT9sowdCASDbQDUoltlv2iWJCLa0xl97KVchCa0pr7HKbFA3J5SLKqFYUBCkFL+5WudYlz2nXxiUgyviMQxyK+ij66kEi6/2zFDAecd43pHV7790ptqZBC3Jc67Emj7Vo3ShX6RXPPxxbeCTOF2ukI45aJ9XcVFH/MFE96NjXj8uahnIsiTPyuCUoJu8tj7TSQyue874qJqVQvqlFyt2aZYJZ8ruq8AEQEAAbQpVGhvbWFzIFBlcnJvdCA8dGhvbWFzLnBlcnJvdEBib290bGluLmNvbT6JAc4EEwEIADgCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQSHQHfGpqMKIwOoEiGfwAsFcf4K7QUCX79mdwAKCRCfwAsFcf4K7fhbC/wP0kSl6id2E/K3+UdXk6CLMVRbCFLCREzQs5WFpQ6l/I0WGOamhrOgegdszheiVForlUP8d37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vCNlJZa1/mOQGzKLWd4vKoNrCsjm3wmbaajTTST7FmnphUmGahx8/Fn/iU+BeNflLW/Z54RbqC7b+0NpeagueoTtgeYzxGsbrammwtkCk4T6YzS4pIRbubde/kKxAYrb/CZU 0S//jkiNumQmWn2Pi+VPXHldd/7vXAaBkzkhN/mzIhBxZRebE1+qADKzDt70J393NfA5nq2FuUU3Q2se5CFBvOpDmsxMhiGQrOOREGMzWj46NA3qsC4VxpetgbjTf1gY/JwvWItWMfVA23SkqRcflE5Mv6gLE39uGSnuYAE6T6j0dMlwPwxhoikSjfeEsEayvBM75xKJvMkXOzZS56rmpx+dC2AlrUFTMFnT9RlalKixZn9McKIELk6eeJkU3m2euvf5JxabEhuNK2zlUQPhXNRlMwTWfTBuDsxcLXnsNi+h4ULfjbBu3VTfdE6DhC7phy6Q8dJuAn8MJDRySBqp/L4juX Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-rtmeiWdgqR/hbY6LMpWH" User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: thomas.perrot@bootlin.com --=-rtmeiWdgqR/hbY6LMpWH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, On Mon, 2024-03-25 at 18:56 -0700, Jakub Kicinski wrote: > On Mon, 25 Mar 2024 20:54:01 +0000 Simon Horman wrote: > > I'm not sure that it is expected behaviour for an interface > > to reset like this when a change of MTU is requested. > > While conversely I think it is common (if not entirely desirable) > > to prohibit changing the MTU when an interface is up. > > What is the problem being addressed here? >=20 The problem being addressed here, is that NetworkManager isn't able to apply the MTU value set in the connection configuration file because the link is already up, then the change_mtu callback returns an error: "NetworkManager[412]: [1709629970.1735] platform: (eth0) link: setting mtu 1400 =20 NetworkManager[412]: [1709629970.1737] platform-linux: delayed- action: schedule wait-for-response-rtnl (seq 41, timeout in 0.199992796, response-type 0) =20 NetworkManager[412]: [1709629970.1737] platform-linux: delayed- action: schedule refresh-link (ifindex 2) =20 NetworkManager[412]: [1709629970.1738] platform-linux: delayed- action: handle refresh-link (ifindex 2) =20 NetworkManager[412]: [1709629970.1738] platform-linux: do- request-link: 2 =20 NetworkManager[412]: [1709629970.1739] platform-linux: rtnl: recvmsg: new message NLMSG_ERROR, flags 0, seq 41 =20 NetworkManager[412]: [1709629970.1740] platform-linux: rtnl: recvmsg: error message from kernel: Device or resource busy (-16) for request 41" Kind regards, Thomas Perrot > Right.. >=20 > > > =C2=A0 dev->mtu =3D new_mtu; > > > =C2=A0 > > > + if (reset) > > > + macb_open(dev); >=20 > .. imagine admin does this over SSH on a remote box and system=20 > is under memory pressure. Even ignoring the fact you're not checking > the return value, the result of changing MTU should be either having=20 > the requested MTU (success) or having the old MTU (failure). > Not "machine drops off the network" :( >=20 --=20 Thomas Perrot, Bootlin Embedded Linux and kernel engineering https://bootlin.com --=-rtmeiWdgqR/hbY6LMpWH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEh0B3xqajCiMDqBIhn8ALBXH+Cu0FAmYCjA8ACgkQn8ALBXH+ Cu151wv/eJxTxKVjILtwXPWoN8a8eYr7hfSRpx8M/MYqrwc4rCuFGuI4wx5vrrk2 N6pBBdqTRR6Ue4CaN/j3IiPS2BpRGmZBLqcfXETdTgPh1/2poRFqNClO6TtgZHwH RQvAiwz3wgQPGHozT0FAfJWsvRdM31dyWxoM/wK28os3p8OQ34O9xSwW5HBcF/Vj 0ny9AlEfzVRUJKEB8sdEM7TzXKnzEdQp5JLoK5+lbl0z03/iBYK/I+H/rnx6QgxZ 7kzxpfu9e/bKjeLf8S+sCdWm3wD49RZPgRcyq/PMGuT+oCo/B7ADpSF07IvT4r5K PiDp8hoJq/NMq70mO2OSPFMBRQMddJBRIypvTvRuURcdscqA/s1UC1SmFcJpTPMO 1kKg8UF4BgLuZMUTnJgiDxD6X85pvUgEn3fAXAbRCdJOxiDegSPLSq2vdKC0WnNC nTF04TfB77BBK6muEoYoqlKSg7xPH0NtZhE5yrPqBhiB87gEPrJ00T0eyYu6oYa0 BDCD8xok =N2Wi -----END PGP SIGNATURE----- --=-rtmeiWdgqR/hbY6LMpWH--