Skip to content

Commit e19778e

Browse files
mfijalkoanguy11
authored andcommitted
ice: clear cmd_type_offset_bsz for TX rings
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: 9610bd9 ("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>
1 parent 72b915a commit e19778e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2562,7 +2562,7 @@ static int ice_xdp_alloc_setup_rings(struct ice_vsi *vsi)
25622562
spin_lock_init(&xdp_ring->tx_lock);
25632563
for (j = 0; j < xdp_ring->count; j++) {
25642564
tx_desc = ICE_TX_DESC(xdp_ring, j);
2565-
tx_desc->cmd_type_offset_bsz = cpu_to_le64(ICE_TX_DESC_DTYPE_DESC_DONE);
2565+
tx_desc->cmd_type_offset_bsz = 0;
25662566
}
25672567
}
25682568

0 commit comments

Comments
 (0)