Commit 8166abb1 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Jeff Kirsher
Browse files

ixgbe: Replace synchronize_sched() with synchronize_rcu()



Now that synchronize_rcu() waits for preempt-disable regions of code
as well as RCU read-side critical sections, synchronize_sched() can be
replaced by synchronize_rcu().  This commit therefore makes this change.

Signed-off-by: default avatar"Paul E. McKenney" <paulmck@linux.ibm.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 0bcd952f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -6077,9 +6077,9 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
	/* Disable Rx */
	ixgbe_disable_rx(adapter);

	/* synchronize_sched() needed for pending XDP buffers to drain */
	/* synchronize_rcu() needed for pending XDP buffers to drain */
	if (adapter->xdp_ring[0])
		synchronize_sched();
		synchronize_rcu();

	ixgbe_irq_disable(adapter);

@@ -10476,7 +10476,7 @@ void ixgbe_txrx_ring_disable(struct ixgbe_adapter *adapter, int ring)
	ixgbe_disable_rxr_hw(adapter, rx_ring);

	if (xdp_ring)
		synchronize_sched();
		synchronize_rcu();

	/* Rx/Tx/XDP Tx share the same napi context. */
	napi_disable(&rx_ring->q_vector->napi);