Skip to content

Commit

Permalink
i40e/i40evf: Use dma_rmb where appropriate
Browse files Browse the repository at this point in the history
Update i40e and i40evf to use dma_rmb.  This should improve performance by
decreasing the barrier overhead on strong ordered architectures.

Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Apr 9, 2015
1 parent 12b3375 commit 6731716
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/i40e/i40e_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, int budget)
* any other fields out of the rx_desc until we know the
* DD bit is set.
*/
rmb();
dma_rmb();
if (i40e_rx_is_programming_status(qword)) {
i40e_clean_programming_status(rx_ring, rx_desc);
I40E_RX_INCREMENT(rx_ring, i);
Expand Down Expand Up @@ -1745,7 +1745,7 @@ static int i40e_clean_rx_irq_1buf(struct i40e_ring *rx_ring, int budget)
* any other fields out of the rx_desc until we know the
* DD bit is set.
*/
rmb();
dma_rmb();

if (i40e_rx_is_programming_status(qword)) {
i40e_clean_programming_status(rx_ring, rx_desc);
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/i40evf/i40e_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, int budget)
* any other fields out of the rx_desc until we know the
* DD bit is set.
*/
rmb();
dma_rmb();
rx_bi = &rx_ring->rx_bi[i];
skb = rx_bi->skb;
if (likely(!skb)) {
Expand Down Expand Up @@ -1213,7 +1213,7 @@ static int i40e_clean_rx_irq_1buf(struct i40e_ring *rx_ring, int budget)
* any other fields out of the rx_desc until we know the
* DD bit is set.
*/
rmb();
dma_rmb();

rx_bi = &rx_ring->rx_bi[i];
skb = rx_bi->skb;
Expand Down

0 comments on commit 6731716

Please sign in to comment.