diff options
| author | Zdenek Bouska <[email protected]> | 2025-03-19 14:18:48 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2025-04-02 15:51:41 +0000 |
| commit | d931cf9b38da0f533cacfe51c863a9912e67822f (patch) | |
| tree | 7bdae1cf88ef5e7356fd607855ccd1958c71c814 /drivers/net/ethernet/intel/igc | |
| parent | igc: Fix XSK queue NAPI ID mapping (diff) | |
| download | kernel-d931cf9b38da0f533cacfe51c863a9912e67822f.tar.gz kernel-d931cf9b38da0f533cacfe51c863a9912e67822f.zip | |
igc: Fix TX drops in XDP ZC
Fixes TX frame drops in AF_XDP zero copy mode when budget < 4.
xsk_tx_peek_desc() consumed TX frame and it was ignored because of
low budget. Not even AF_XDP completion was done for dropped frames.
It can be reproduced on i226 by sending 100000x 60 B frames with
launch time set to minimal IPG (672 ns between starts of frames)
on 1Gbit/s. Always 1026 frames are not sent and are missing a
completion.
Fixes: 9acf59a752d4c ("igc: Enable TX via AF_XDP zero-copy")
Signed-off-by: Zdenek Bouska <[email protected]>
Reviewed-by: Song Yoong Siang <[email protected]>
Reviewed-by: Florian Bezdeka <[email protected]>
Tested-by: Mor Bar-Gabay <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc')
| -rw-r--r-- | drivers/net/ethernet/intel/igc/igc_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 27c99ff59ed4..156d123c0e21 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -3042,7 +3042,7 @@ static void igc_xdp_xmit_zc(struct igc_ring *ring) * descriptors. Therefore, to be safe, we always ensure we have at least * 4 descriptors available. */ - while (xsk_tx_peek_desc(pool, &xdp_desc) && budget >= 4) { + while (budget >= 4 && xsk_tx_peek_desc(pool, &xdp_desc)) { struct igc_metadata_request meta_req; struct xsk_tx_metadata *meta = NULL; struct igc_tx_buffer *bi; |
