diff mbox series

[net-next] eth: fbnic: update fbnic_poll return value

Message ID 20250104015316.3192946-1-mohsin.bashr@gmail.com (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series [net-next] eth: fbnic: update fbnic_poll return value | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 2 this patch: 2
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-01-04--18-00 (tests: 887)

Commit Message

Mohsin Bashir Jan. 4, 2025, 1:53 a.m. UTC
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

Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
---
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jakub Kicinski Jan. 5, 2025, 12:59 a.m. UTC | #1
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: Jakub Kicinski <kuba@kernel.org>
Kalesh Anakkur Purayil Jan. 5, 2025, 6:39 a.m. UTC | #2
On Sat, Jan 4, 2025 at 7:23 AM Mohsin Bashir <mohsin.bashr@gmail.com> 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.
>
> Before:
> @[10]: 1
> ...
> @[64]: 208175
> @[0]: 2128008
>
> After:
> @[56]: 86
> @[48]: 222
> ...
> @[5]: 1885756
> @[6]: 1933841
>
> Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
LGTM,
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
index bb54ce5f5787..d4d7027df9a0 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
@@ -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)