Skip to contentSkip to conversation

eth: fbnic: update fbnic_poll return value

PATCH Applied Mohsin Bashir 4 participants 4 messages Jan 4, 2025 – Jan 7, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eth: fbnic: update fbnic_poll return value

In cases where the work done is less than the budget, fbnic_poll is returning 0. This affects the tracing of napi_poll. Following is a snippet of before and after result from napi_poll tracepoint. Instead, returning the work done improves the manual tracing.

Before:
@[10]: 1
...
@[64]: 208175
@[0]: 2128008

After:
@[56]: 86
@[48]: 222
...
@[5]: 1885756
@[6]: 1933841

---
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +1 -1
index bb54ce5f5787..d4d7027df9a0 100644
@@ -1033,7 +1033,7 @@ static int fbnic_poll(struct napi_struct *napi, int budget)
 	if (likely(napi_complete_done(napi, work_done)))
 		fbnic_nv_irq_rearm(nv);
 
-	return 0;
+	return work_done;
 }
 
 irqreturn_t fbnic_msix_clean_rings(int __always_unused irq, void *data)
Signature · 1 line
2.43.5
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · On Fri, 3 Jan 2025 17:53:16 -0800 Mohsin Bashir wrote:

In cases where the work done is less than the budget, fbnic_poll is returning 0. This affects the tracing of napi_poll. Following is a snippet of before and after result from napi_poll tracepoint. Instead, returning the work done improves the manual tracing.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Mohsin Bashir
Quoted 12 lines · Mohsin Bashir

In cases where the work done is less than the budget, fbnic_poll is returning 0. This affects the tracing of napi_poll. Following is a snippet of before and after result from napi_poll tracepoint. Instead, returning the work done improves the manual tracing.

Before:
@[10]: 1
...
@[64]: 208175
@[0]: 2128008

Quoted 8 lines

After:
@[56]: 86
@[48]: 222
...
@[5]: 1885756
@[6]: 1933841

LGTM,

Signature · 2 lines
Regards,
Kalesh AP
#3 lore raw
In reply to Mohsin Bashir
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 5 lines · On Fri, 3 Jan 2025 17:53:16 -0800 you wrote:

In cases where the work done is less than the budget, fbnic_poll is returning 0. This affects the tracing of napi_poll. Following is a snippet of before and after result from napi_poll tracepoint. Instead, returning the work done improves the manual tracing.

Quoted 7 lines

Before:
@[10]: 1
...
@[64]: 208175
@[0]: 2128008

[...]

Here is the summary with links:
- [net-next] eth: fbnic: update fbnic_poll return value

    https://git.kernel.org/netdev/net-next/c/2f4f8893e07a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html