]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ice: xsk: Fix cleaning of XDP_TX frames
authorLarysa Zaremba <larysa.zaremba@intel.com>
Thu, 9 Feb 2023 16:01:30 +0000 (17:01 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Feb 2023 03:42:10 +0000 (19:42 -0800)
commit1f090494170ea298530cf1285fb8d078e355b4c0
tree33ca06097a5c427c5a0285f1d7d39ba91f54a329
parentee059170b1f7e94e55fa6cadee544e176a6e59c2
ice: xsk: Fix cleaning of XDP_TX frames

Incrementation of xsk_frames inside the for-loop produces
infinite loop, if we have both normal AF_XDP-TX and XDP_TXed
buffers to complete.

Split xsk_frames into 2 variables (xsk_frames and completed_frames)
to eliminate this bug.

Fixes: 29322791bc8b ("ice: xsk: change batched Tx descriptor cleaning")
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Acked-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20230209160130.1779890-1-larysa.zaremba@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/ice/ice_xsk.c