Re: [net-next v18 2/7] net: mtip: The L2 switch driver for imx287

From: Jakub Kicinski
Date: Fri Aug 15 2025 - 21:29:44 EST


On Wed, 13 Aug 2025 09:07:50 +0200 Lukasz Majewski wrote:
> + pkts = mtip_switch_rx(napi->dev, budget, &port);
> + if (pkts == -ENOMEM) {
> + napi_complete(napi);
> + return 0;

And what happens next? looks like you're not unmasking the interrupt in
this case so we'll never get an IRQ until timeout kicks in?

> + }
> +
> + if ((port == 1 || port == 2) && fep->ndev[port - 1])
> + mtip_switch_tx(fep->ndev[port - 1]);
> + else
> + mtip_switch_tx(napi->dev);
> +
> + if (pkts < budget) {
> + napi_complete_done(napi, pkts);

Please take napi_complete_done()'s return value into account

> + /* Set default interrupt mask for L2 switch */
> + writel(MCF_ESW_IMR_RXF | MCF_ESW_IMR_TXF,
> + fep->hwp + ESW_IMR);
> + }