net: ena: Refactor napi functions
authorDavid Arinzon <darinzon@amazon.com>
Mon, 1 Jan 2024 19:08:51 +0000 (19:08 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Jan 2024 02:00:57 +0000 (18:00 -0800)
commitb626fd9627d40fd291289dba9b53cd5cdbb17362
tree79cf45aebb0ec254b6b684b8418cc8233dba2ad1
parent436c793585951464e2b679c440083daa19f6fb02
net: ena: Refactor napi functions

This patch focuses on changes to the XDP part of the napi
polling routine.

1. Update the `napi_comp` stat only when napi is actually
   complete.
2. Simplify the code by using a function pointer to the right
   napi routine (XDP vs non-XDP path)
3. Remove unnecessary local variables.
4. Adjust a debug print to show the processed XDP frame index
   rather than the pointer.

Signed-off-by: David Arinzon <darinzon@amazon.com>
Link: https://lore.kernel.org/r/20240101190855.18739-8-darinzon@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amazon/ena/ena_xdp.c