From: Jakub Kicinski <kuba@kernel.org>
To: xuanzhuo@linux.alibaba.com
Cc: Jakub Kicinski <kuba@kernel.org>,
edumazet@google.com, lulie@linux.alibaba.com, andrew@lunn.ch,
dust.li@linux.alibaba.com, andrew+netdev@lunn.ch,
guwen@linux.alibaba.com, lorenzo@kernel.org,
lukas.bulwahn@redhat.com, davem@davemloft.net, dong100@mucse.com,
vadim.fedorenko@linux.dev, pabeni@redhat.com,
netdev@vger.kernel.org, hkallweit1@gmail.com
Subject: Re: [net-next,v23,4/6] eea: create/destroy rx,tx queues for netdevice open and stop
Date: Thu, 29 Jan 2026 20:02:13 -0800 [thread overview]
Message-ID: <20260130040213.708779-1-kuba@kernel.org> (raw)
In-Reply-To: <20260128055232.8021-5-xuanzhuo@linux.alibaba.com>
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
next prev parent reply other threads:[~2026-01-30 4:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 5:52 [PATCH net-next v23 0/6] eea: Add basic driver framework for Alibaba Elastic Ethernet Adaptor Xuan Zhuo
2026-01-28 5:52 ` [PATCH net-next v23 1/6] eea: introduce PCI framework Xuan Zhuo
2026-01-28 5:52 ` [PATCH net-next v23 2/6] eea: introduce ring and descriptor structures Xuan Zhuo
2026-01-28 5:52 ` [PATCH net-next v23 3/6] eea: probe the netdevice and create adminq Xuan Zhuo
2026-01-28 5:52 ` [PATCH net-next v23 4/6] eea: create/destroy rx,tx queues for netdevice open and stop Xuan Zhuo
2026-01-30 4:02 ` Jakub Kicinski [this message]
2026-01-28 5:52 ` [PATCH net-next v23 5/6] eea: introduce ethtool support Xuan Zhuo
2026-01-30 4:02 ` [net-next,v23,5/6] " Jakub Kicinski
2026-01-28 5:52 ` [PATCH net-next v23 6/6] eea: introduce callback for ndo_get_stats64 Xuan Zhuo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260130040213.708779-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dong100@mucse.com \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=hkallweit1@gmail.com \
--cc=lorenzo@kernel.org \
--cc=lukas.bulwahn@redhat.com \
--cc=lulie@linux.alibaba.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vadim.fedorenko@linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox