Skip to content

Commit 7e3b407

Browse files
walking-machineanguy11
authored andcommitted
ice: remove ICE_CFG_BUSY locking from AF_XDP code
Locking used in ice_qp_ena() and ice_qp_dis() does pretty much nothing, because ICE_CFG_BUSY is a state flag that is supposed to be set in a PF state, not VSI one. Therefore it does not protect the queue pair from e.g. reset. Remove ICE_CFG_BUSY locking from ice_qp_dis() and ice_qp_ena(). Fixes: 2d4238f ("ice: Add support for AF_XDP") Reviewed-by: Wojciech Drewek <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Tested-by: Chandan Kumar Rout <[email protected]> Reviewed-by: Maciej Fijalkowski <[email protected]> Signed-off-by: Larysa Zaremba <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent d8c40b9 commit 7e3b407

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
165165
struct ice_q_vector *q_vector;
166166
struct ice_tx_ring *tx_ring;
167167
struct ice_rx_ring *rx_ring;
168-
int timeout = 50;
169168
int fail = 0;
170169
int err;
171170

@@ -176,13 +175,6 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
176175
rx_ring = vsi->rx_rings[q_idx];
177176
q_vector = rx_ring->q_vector;
178177

179-
while (test_and_set_bit(ICE_CFG_BUSY, vsi->state)) {
180-
timeout--;
181-
if (!timeout)
182-
return -EBUSY;
183-
usleep_range(1000, 2000);
184-
}
185-
186178
synchronize_net();
187179
netif_carrier_off(vsi->netdev);
188180
netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
@@ -261,7 +253,6 @@ static int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)
261253
netif_tx_start_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
262254
netif_carrier_on(vsi->netdev);
263255
}
264-
clear_bit(ICE_CFG_BUSY, vsi->state);
265256

266257
return fail;
267258
}

0 commit comments

Comments
 (0)