Re: [PATCH v2 14/15] net: rnpgbe: Add base rx function
From: Yibo Dong <dong100@mucse.com>
Date: 2025-07-23 06:50:46
Also in:
linux-doc, lkml
On Tue, Jul 22, 2025 at 03:14:26PM +0100, Simon Horman wrote:
On Mon, Jul 21, 2025 at 07:32:37PM +0800, Dong Yibo wrote:quoted
Initialize rx clean function. Signed-off-by: Dong Yibo <dong100@mucse.com>...quoted
diff --git a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_lib.c b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_lib.c...quoted
@@ -299,12 +707,27 @@ static int rnpgbe_poll(struct napi_struct *napi, int budget) struct mucse_q_vector *q_vector = container_of(napi, struct mucse_q_vector, napi); struct mucse *mucse = q_vector->mucse; + int per_ring_budget, work_done = 0; bool clean_complete = true; struct mucse_ring *ring; - int work_done = 0; + int cleaned_total = 0;cleaned_total is set but otherwise unused in this function. Flagged by Clang 20.1.8 builds with KCFLAGS=-Wunused-but-set-variable.
Got it, I can get this warning with KCFLAGS=-Wunused-but-set-variable locally, I'll fix it.
quoted
mucse_for_each_ring(ring, q_vector->tx) clean_complete = rnpgbe_clean_tx_irq(q_vector, ring, budget); + if (q_vector->rx.count > 1) + per_ring_budget = max(budget / q_vector->rx.count, 1); + else + per_ring_budget = budget; + + mucse_for_each_ring(ring, q_vector->rx) { + int cleaned = 0; + + cleaned = rnpgbe_clean_rx_irq(q_vector, ring, per_ring_budget); + work_done += cleaned; + cleaned_total += cleaned; + if (cleaned >= per_ring_budget) + clean_complete = false; + } if (!netif_running(mucse->netdev)) clean_complete = true;...quoted
@@ -871,6 +1323,8 @@ static int rnpgbe_setup_rx_resources(struct mucse_ring *rx_ring, memset(rx_ring->desc, 0, rx_ring->size); rx_ring->next_to_clean = 0; rx_ring->next_to_use = 0; + if (mucse_alloc_page_pool(rx_ring)There is a trailing ')' missing from the line above.
Yes, compile error here. I'll fix it.
quoted
+ goto err; return 0; err:...
Thanks for your feedback.