net: ena: Account for the number of processed bytes in XDP
authorDavid Arinzon <darinzon@amazon.com>
Thu, 29 Dec 2022 07:30:07 +0000 (07:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Dec 2022 07:43:43 +0000 (07:43 +0000)
The size of packets that were forwarded or dropped by XDP wasn't added
to the total processed bytes statistic.

Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action")
Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: David Arinzon <darinzon@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c

index 6ba9b06..9ae86bd 100644 (file)
@@ -1719,6 +1719,7 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
                        }
                        if (xdp_verdict != XDP_PASS) {
                                xdp_flags |= xdp_verdict;
+                               total_len += ena_rx_ctx.ena_bufs[0].len;
                                res_budget--;
                                continue;
                        }