Article View: linux.kernel.netdev
Article #4185Re: [PATCH net-next v5 7/8] net: bcmgenet: allow the MTU to be changed
From: Jakub Kicinski
Date: Sat, 17 Oct 2026 01:24
Date: Sat, 17 Oct 2026 01:24
15 lines
6266 bytes
6266 bytes
On Tue, 13 Oct 2026 16:20:36 +0200 Nicolai Buchwitz wrote:
> + ret = bcmgenet_init_dma(priv, true);
> + if (ret) {
> + /* Retry the size that was allocated a moment ago */
> + WRITE_ONCE(dev->mtu, old_mtu);
> + priv->rx_buf_len = bcmgenet_rx_buf_len(old_mtu);
> + bcmgenet_set_mtu_regs(priv, old_mtu);
> + if (bcmgenet_init_dma(priv, true)) {
This will fail under memory pressure leaving the device inoperable.
> + priv->datapath_up = true;
Hallmark of a bad design
Technical Details
Message-ID:
<20261016182415.73f4f7e4@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347592-linux-kernel-netdev=dewy.ruReferences:
<20261013-nb-genet-mtu-nn-v2-v5-0-076b6fc240be@tipi-net.de> <20261013-nb-genet-mtu-nn-v2-v5-7-076b6fc240be@tipi-net.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347592-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v5 7/8] net: bcmgenet: allow the MTU to be changed Date: Fri, 16 Oct 2026 18:24:15 -0700 Organization: Usenet Network Message-ID: <20261016182415.73f4f7e4@kernel.org> References: <20261013-nb-genet-mtu-nn-v2-v5-0-076b6fc240be@tipi-net.de> <20261013-nb-genet-mtu-nn-v2-v5-7-076b6fc240be@tipi-net.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2933667"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ZRSaEzbbbnk4Z1nPgGSQzcHavWg= sha256:C70iAt19Lbh20Ft4PNH5EWACWCkIvWIkiKEft8dOh8A= sha1:uv/0Rf/1RMSu3+kvhJyE2s+9HYY= sha256:23t+Sab0RgAxE/QF2HvPNmPYeISEUg/Tpm5YYa7ntMk= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id C1E5611063C; Sat, 17 Oct 2026 04:24:33 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZAv1ucfl9UQd; Sat, 17 Oct 2026 04:24:31 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-347592-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 08C31110637; Sat, 17 Oct 2026 04:24:20 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id D140D3BA12; Sat, 17 Oct 2026 01:24:18 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 360F231E83B; Sat, 17 Oct 2026 01:24:18 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cRMc6DTd" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 459F929D294; Sat, 17 Oct 2026 01:24:17 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792200258; cv=none; b=S0VA3v8DN1vEVbn84AR0UokMbWRNGCLAOiiUneSQ9crO7JLm5qXIIFkD0X9CT4gVAS+O0OB2cdqou6TQAwnmdbMbyXz6kfCisTy1ZwoQPh/PBFUW5JZcQR+RFmtHE43x73weWRln9VC7ryV9dAnVw0aG7l6EUme3lXg9QENZGII= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792200258; c=relaxed/simple; bh=WQUisSeF0O0LuNkimUFVjMwO1jyGnluPFHK1gQPwZWU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gPrlDKhpd8BOVFx9UY5gtTP8TsXkDoyxL0RJLvDa7sVfCh17qnMVan7q8CFJf3om5UsjI1ZysZDtaUrTj44XYFaFKGpqQ57IjokKW6VFmNBu3UmgPm2j/5xjRg3mouAxCVYK0mUFUymGH9/hZYXqmOiMRn7EI1GicEx7MK2Qjr8= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cRMc6DTd; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8004C1F000C4; Sat, 17 Oct 2026 01:24:16 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792200256; bh=5Hcz/1d7zm5VCEh69lD6eE40r3K8pPLFoAq0gPGeRko=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=cRMc6DTdzvgslpWqD0zfs8kIyJRQCWP7kgPDFuWM26VPBW1QJJmairHdhwSp1s9Bh KuuKIVUOrlFrk7EsycirAjZV/mUzZls0bLdAOFvgW7nVgSaIv73kMWQnmn1FDZbFh4 VnfL27KKV6O/U/InS2aDwhR3plij6XD6C64r0UGRe4Xj4nXiyYtNyb27xaYLJFGSN5 pnQDnBQO6wFUfCbreXP74TSvpetT7pbD2XYrRv6hjHNnfZuF3RCMPJ/7OMkLRDiRUh GMh8Nx8rHDBumMzIjaS7ld7SSU1JxoEHLbAKBQDvMTByje68J5cR8fcIz+tWAfCKzh cbcTqKtcW+8vg== X-Cc: Doug Berger <opendmb@gmail.com>, Florian Fainelli <florian.fainelli@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Stevenson <dave.stevenson@raspberrypi.com>, Justin Chen <justin.chen@broadcom.com>, Pierre-Marin Leclercq <pierremarinleclercq88@gmail.com>, Florian Fainelli <f.fainelli@gmail.com> X-In-Reply-To: <20261013-nb-genet-mtu-nn-v2-v5-7-076b6fc240be@tipi-net.de> X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>