Thread (20 messages) 20 messages, 3 authors, 2d ago

Re: [PATCH net-next v5 7/8] net: bcmgenet: allow the MTU to be changed

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-10-17 01:24:17
Also in: lkml

On Tue, 13 Oct 2026 16:20:36 +0200 Nicolai Buchwitz wrote:
quoted hunk ↗ jump to hunk
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help