public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* Re: [net-next,v21,6/7] net: mtip: Extend the L2 switch driver with management operations
       [not found] <20260129110154.1699976-7-lukasz.majewski@mailbox.org>
@ 2026-01-31  1:54 ` Jakub Kicinski
  0 siblings, 0 replies; only message in thread
From: Jakub Kicinski @ 2026-01-31  1:54 UTC (permalink / raw)
  To: lukasz.majewski
  Cc: Jakub Kicinski, devicetree, horms, krzk+dt, s.hauer, netdev,
	linux-kernel, kernel, richardcochran, shawnguo, edumazet,
	linux-arm-kernel, andrew+netdev, pabeni, wahrenst, davem,
	festevam, conor+dt, imx, andrew, robh

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.

> 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;
> +	}

[ ... ]


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-31  1:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260129110154.1699976-7-lukasz.majewski@mailbox.org>
2026-01-31  1:54 ` [net-next,v21,6/7] net: mtip: Extend the L2 switch driver with management operations Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox