Thread (9 messages) 9 messages, 2 authors, 2026-01-30

Re: [net-next,v23,4/6] eea: create/destroy rx,tx queues for netdevice open and stop

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-01-30 04:02:15

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.
quoted hunk ↗ jump to hunk
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help