Thread (12 messages) 12 messages, 2 authors, 2026-01-31

Re: [net-next,v21,6/7] net: mtip: Extend the L2 switch driver with management operations

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-01-31 01:54:40
Also in: imx, linux-arm-kernel, linux-devicetree, lkml

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.

For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
net: mtip: Extend the L2 switch driver with management operations

This patch adds management functions for the L2 switch including VLAN
configuration, port learning/blocking, multicast/broadcast control,
and forced forwarding for port separation.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/freescale/mtipsw/mtipl2sw_mgnt.c b/drivers/net/ethernet/freescale/mtipsw/mtipl2sw_mgnt.c
--- /dev/null
+++ b/drivers/net/ethernet/freescale/mtipsw/mtipl2sw_mgnt.c
[ ... ]
+int mtip_vlan_input_process(struct switch_enet_private *fep,
+			    int port, int mode, unsigned short port_vlanid,
+			    int vlan_verify_en, int vlan_domain_num,
+			    int vlan_domain_port)
+{
+	/* Only modes from 1 to 4 are valid*/
+	if (mode < 0 || mode > 4) {
                       ^^^^

The comment says modes 1-4 are valid, but the condition allows mode 0
to pass through. Should the check be "mode < 1" instead, or is the
comment incorrect and mode 0 is actually valid?
+		dev_err(&fep->pdev->dev,
+			"%s: VLAN input processing mode (%d) not supported\n",
+			__func__, mode);
+		return -EINVAL;
+	}
[ ... ]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help