Skip to content

Commit 99099c6

Browse files
mfijalkoanguy11
authored andcommitted
ice: reorder disabling IRQ and NAPI in ice_qp_dis
ice_qp_dis() currently does things in very mixed way. Tx is stopped before disabling IRQ on related queue vector, then it takes care of disabling Rx and finally NAPI is disabled. Let us start with disabling IRQs in the first place followed by turning off NAPI. Then it is safe to handle queues. One subtle change on top of that is that even though ice_qp_ena() looks more sane, clear ICE_CFG_BUSY as the last thing there. Fixes: 2d4238f ("ice: Add support for AF_XDP") Signed-off-by: Maciej Fijalkowski <[email protected]> Tested-by: Chandan Kumar Rout <[email protected]> (A Contingent Worker at Intel) Acked-by: Magnus Karlsson <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent d562b11 commit 99099c6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
179179
return -EBUSY;
180180
usleep_range(1000, 2000);
181181
}
182+
183+
ice_qvec_dis_irq(vsi, rx_ring, q_vector);
184+
ice_qvec_toggle_napi(vsi, q_vector, false);
185+
182186
netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
183187

184188
ice_fill_txq_meta(vsi, tx_ring, &txq_meta);
@@ -195,13 +199,10 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
195199
if (err)
196200
return err;
197201
}
198-
ice_qvec_dis_irq(vsi, rx_ring, q_vector);
199-
200202
err = ice_vsi_ctrl_one_rx_ring(vsi, false, q_idx, true);
201203
if (err)
202204
return err;
203205

204-
ice_qvec_toggle_napi(vsi, q_vector, false);
205206
ice_qp_clean_rings(vsi, q_idx);
206207
ice_qp_reset_stats(vsi, q_idx);
207208

@@ -259,11 +260,11 @@ static int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)
259260
if (err)
260261
return err;
261262

262-
clear_bit(ICE_CFG_BUSY, vsi->state);
263263
ice_qvec_toggle_napi(vsi, q_vector, true);
264264
ice_qvec_ena_irq(vsi, q_vector);
265265

266266
netif_tx_start_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
267+
clear_bit(ICE_CFG_BUSY, vsi->state);
267268

268269
return 0;
269270
}

0 commit comments

Comments
 (0)