Skip to content

Commit 405d999

Browse files
mfijalkoanguy11
authored andcommitted
ice: replace synchronize_rcu with synchronize_net
Given that ice_qp_dis() is called under rtnl_lock, synchronize_net() can be called instead of synchronize_rcu() so that XDP rings can finish its job in a faster way. Also let us do this as earlier in XSK queue disable flow. Additionally, turn off regular Tx queue before disabling irqs and NAPI. Fixes: 2d4238f ("ice: Add support for AF_XDP") Reviewed-by: Shannon Nelson <[email protected]> Tested-by: Chandan Kumar Rout <[email protected]> (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 1ff72a2 commit 405d999

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ static void ice_qp_reset_stats(struct ice_vsi *vsi, u16 q_idx)
5252
static void ice_qp_clean_rings(struct ice_vsi *vsi, u16 q_idx)
5353
{
5454
ice_clean_tx_ring(vsi->tx_rings[q_idx]);
55-
if (ice_is_xdp_ena_vsi(vsi)) {
56-
synchronize_rcu();
55+
if (ice_is_xdp_ena_vsi(vsi))
5756
ice_clean_tx_ring(vsi->xdp_rings[q_idx]);
58-
}
5957
ice_clean_rx_ring(vsi->rx_rings[q_idx]);
6058
}
6159

@@ -180,11 +178,12 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
180178
usleep_range(1000, 2000);
181179
}
182180

181+
synchronize_net();
182+
netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
183+
183184
ice_qvec_dis_irq(vsi, rx_ring, q_vector);
184185
ice_qvec_toggle_napi(vsi, q_vector, false);
185186

186-
netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
187-
188187
ice_fill_txq_meta(vsi, tx_ring, &txq_meta);
189188
err = ice_vsi_stop_tx_ring(vsi, ICE_NO_RESET, 0, tx_ring, &txq_meta);
190189
if (err)

0 commit comments

Comments
 (0)