]> git.baikalelectronics.ru Git - kernel.git/commit
net: ena: xdp: update napi budget for DROP and ABORTED
authorSameeh Jubran <sameehj@amazon.com>
Wed, 3 Jun 2020 08:50:23 +0000 (08:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jun 2020 22:43:01 +0000 (15:43 -0700)
commitc0414643ff8037907cddeeba40f096444d3d416d
tree586195c55f9cfb98d735603a97c443c137932056
parentefbe32963db653c111627ce792388148f32b1677
net: ena: xdp: update napi budget for DROP and ABORTED

This patch fixes two issues with XDP:

1. If the XDP verdict is XDP_ABORTED we break the loop, which results in
   us handling one buffer per napi cycle instead of the total budget
   (usually 64). To overcome this simply change the xdp_verdict check to
   != XDP_PASS. When the verdict is XDP_PASS, the skb is not expected to
   be NULL.

2. Update the residual budget for XDP_DROP and XDP_ABORTED, since
   packets are handled in these cases.

Fixes: 27938dd2da07 ("net: ena: Implement XDP_TX action")
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c