octeon_ep: Relocate counter updates before NAPI
authorVimlesh Kumar <vimleshk@marvell.com>
Fri, 27 Feb 2026 09:13:57 +0000 (09:13 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 3 Mar 2026 10:34:20 +0000 (11:34 +0100)
commit18c04a808c436d629d5812ce883e3822a5f5a47f
tree13bddaaaf130d409b6217909023da39343e89f31
parent210fd8f40820c3c1f97ead0cb171374a09fdcbe0
octeon_ep: Relocate counter updates before NAPI

Relocate IQ/OQ IN/OUT_CNTS updates to occur before NAPI completion,
and replace napi_complete with napi_complete_done.

Moving the IQ/OQ counter updates before napi_complete_done ensures
1. Counter registers are updated before re-enabling interrupts.
2. Prevents a race where new packets arrive but counters aren't properly
   synchronized.
napi_complete_done (vs napi_complete) allows for better
interrupt coalescing.

Fixes: 37d79d0596062 ("octeon_ep: add Tx/Rx processing and interrupt support")
Signed-off-by: Sathesh Edara <sedara@marvell.com>
Signed-off-by: Shinas Rasheed <srasheed@marvell.com>
Signed-off-by: Vimlesh Kumar <vimleshk@marvell.com>
Link: https://patch.msgid.link/20260227091402.1773833-2-vimleshk@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/octeon_ep/octep_main.c