Skip to content

Commit

Permalink
igb: simplify swap in clean_rx_irq if using packet split
Browse files Browse the repository at this point in the history
This update replaces the xchg calls that were added with a pair of
assignments as there is no need for the xchg calls and they were found to
cause issues on some architectures.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-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 Nov 20, 2008
1 parent 3ef6b23 commit b2d5653
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3926,8 +3926,10 @@ static bool igb_clean_rx_irq_adv(struct igb_ring *rx_ring,
next_buffer = &rx_ring->buffer_info[i];

if (!(staterr & E1000_RXD_STAT_EOP)) {
buffer_info->skb = xchg(&next_buffer->skb, skb);
buffer_info->dma = xchg(&next_buffer->dma, 0);
buffer_info->skb = next_buffer->skb;
buffer_info->dma = next_buffer->dma;
next_buffer->skb = skb;
next_buffer->dma = 0;
goto next_desc;
}

Expand Down

0 comments on commit b2d5653

Please sign in to comment.