Skip to content

Commit

Permalink
ixgbe: Replace synchronize_sched() with synchronize_rcu()
Browse files Browse the repository at this point in the history
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: "Paul E. McKenney" <paulmck@linux.ibm.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Paul E. McKenney authored and Jeff Kirsher committed Nov 21, 2018
1 parent 0bcd952 commit 8166abb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8166abb

Please sign in to comment.