]> git.baikalelectronics.ru Git - kernel.git/commit
ice: xsk: Stop Rx processing when ntc catches ntu
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Mon, 28 Mar 2022 14:21:22 +0000 (16:21 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 29 Mar 2022 02:56:28 +0000 (19:56 -0700)
commitf9524f61120ddc5e5636821debc607610abbdf17
treed33c42d23720d1ce9752a29d58285eb2ec9ea721
parentc909576b8e3e531964134d6589b8759fd56cd6cf
ice: xsk: Stop Rx processing when ntc catches ntu

This can happen with big budget values and some breakage of re-filling
descriptors as we do not clear the entry that ntu is pointing at the end
of ice_alloc_rx_bufs_zc. So if ntc is at ntu then it might be the case
that status_error0 has an old, uncleared value and ntc would go over
with processing which would result in false results.

Break Rx loop when ntc == ntu to avoid broken behavior.

Fixes: 0f8cc4f9199a ("ice: xsk: Handle SW XDP ring wrap and bump tail more often")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220328142123.170157-4-maciej.fijalkowski@intel.com
drivers/net/ethernet/intel/ice/ice_xsk.c