Commit 8a9f82ff authored by Roger Quadros's avatar Roger Quadros Committed by Jakub Kicinski
Browse files

net: ethernet: ti: am65-cpsw: fix RX & TX statistics for XDP_TX case



For successful XDP_TX and XDP_REDIRECT cases, the packet was received
successfully so update RX statistics. Use original received
packet length for that.

TX packets statistics are incremented on TX completion so don't
update it while TX queueing.

If xdp_convert_buff_to_frame() fails, increment tx_dropped.

Signed-off-by: default avatarRoger Quadros <rogerq@kernel.org>
Fixes: 8acacc40 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support")
Link: https://patch.msgid.link/20250210-am65-cpsw-xdp-fixes-v1-2-ec6b1f7f1aca@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5db84325
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment