ice: clear cmd_type_offset_bsz for TX rings
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Thu, 17 Mar 2022 18:36:29 +0000 (19:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:03:16 +0000 (20:03 +0200)
commit9567803d745e3bcc54b75bce59de738d0b4c8e24
tree31f76a5e26e83b8c54fb40b61738f6252d4ce0d9
parent6421edd0b01f0b9b64575a289c0417a973c67ff7
ice: clear cmd_type_offset_bsz for TX rings

[ Upstream commit e19778e6c911691856447c3bf9617f00b3e1347f ]

Currently when XDP rings are created, each descriptor gets its DD bit
set, which turns out to be the wrong approach as it can lead to a
situation where more descriptors get cleaned than it was supposed to,
e.g. when AF_XDP busy poll is run with a large batch size. In this
situation, the driver would request for more buffers than it is able to
handle.

Fix this by not setting the DD bits in ice_xdp_alloc_setup_rings(). They
should be initialized to zero instead.

Fixes: 9610bd988df9 ("ice: optimize XDP_TX workloads")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Shwetha Nagaraju <shwetha.nagaraju@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_main.c