lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260130040213.708779-1-kuba@kernel.org>
Date: Thu, 29 Jan 2026 20:02:13 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: xuanzhuo@...ux.alibaba.com
Cc: Jakub Kicinski <kuba@...nel.org>,
	edumazet@...gle.com,
	lulie@...ux.alibaba.com,
	andrew@...n.ch,
	dust.li@...ux.alibaba.com,
	andrew+netdev@...n.ch,
	guwen@...ux.alibaba.com,
	lorenzo@...nel.org,
	lukas.bulwahn@...hat.com,
	davem@...emloft.net,
	dong100@...se.com,
	vadim.fedorenko@...ux.dev,
	pabeni@...hat.com,
	netdev@...r.kernel.org,
	hkallweit1@...il.com
Subject: Re: [net-next,v23,4/6] eea: create/destroy rx,tx queues for netdevice open and stop

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
---
    eea: create/destroy rx,tx queues for netdevice open and stop

This commit adds the netdevice open/stop implementation for the Alibaba
Elastic Ethernet Adapter, including RX/TX queue allocation, IRQ setup,
NAPI handling, and HA reset support.

> diff --git a/drivers/net/ethernet/alibaba/eea/eea_rx.c b/drivers/net/ethernet/alibaba/eea/eea_rx.c
> new file mode 100644
> index 000000000000..979458cbffa9
> --- /dev/null
> +++ b/drivers/net/ethernet/alibaba/eea/eea_rx.c

[ ... ]

> +int eea_poll(struct napi_struct *napi, int budget)
> +{
> +	struct eea_net_rx *rx = container_of(napi, struct eea_net_rx, napi);
> +	struct eea_net_tx *tx = &rx->enet->tx[rx->index];
> +	struct eea_net *enet = rx->enet;
> +	struct eea_rx_ctx ctx = {};
> +	bool busy = false;
> +	u32 received;
> +
> +	eea_poll_tx(tx, budget);
> +
> +	received = eea_cleanrx(rx, budget, &ctx);
> +
> +	if (rx->ering->num_free > budget)
> +		busy |= eea_rx_post(enet, rx);
> +
> +	busy |= received >= budget;
> +
> +	if (!busy) {
> +		if (napi_complete_done(napi, received))
> +			ering_irq_active(rx->ering, tx->ering);
> +	}
> +
> +	if (busy)
> +		return budget;
> +
> +	return budget - 1;
          ^^^^^^^^^^^^

Should this return "received" instead of "budget - 1"? The NAPI poll
function is expected to return the actual number of packets processed
so that networking statistics are accurate. Returning "budget - 1"
unconditionally when not busy seems inconsistent with other drivers
which return the work done (mlx5e_napi_poll, ixgbe_poll, etc.).

Looking at napi_complete_done() above, the correct "received" value is
already being passed there, suggesting the intent was to track actual
work done.

> +}

[ ... ]
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ