diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-06-04 11:59:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-07 08:20:20 -0400 |
commit | 21fa4e66bd0bedfa4ed6aa6f7008b2aff6d45c8d (patch) | |
tree | a0a828616b4645b5843b62de87321857096ae7a5 /drivers | |
parent | 74766013a131f1e1c2fe8fd138e12841eb708060 (diff) |
ixgbe: use rx_buffer_info->dma instead of nr_frags to determine skb unmap
This patch changes the driver so that it uses rx_buffer_info->dma to
determine if it needs to unmap the page instead of sh_info->nr_frags. This
helps to prevent a cache line miss when receiving small packets as the
rx_buffer_info data should already be in the cache.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 9684632f15b8..e1efa1d7df4e 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -708,7 +708,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, | |||
708 | prefetch(skb->data - NET_IP_ALIGN); | 708 | prefetch(skb->data - NET_IP_ALIGN); |
709 | rx_buffer_info->skb = NULL; | 709 | rx_buffer_info->skb = NULL; |
710 | 710 | ||
711 | if (len && !skb_shinfo(skb)->nr_frags) { | 711 | if (rx_buffer_info->dma) { |
712 | pci_unmap_single(pdev, rx_buffer_info->dma, | 712 | pci_unmap_single(pdev, rx_buffer_info->dma, |
713 | rx_ring->rx_buf_len, | 713 | rx_ring->rx_buf_len, |
714 | PCI_DMA_FROMDEVICE); | 714 | PCI_DMA_FROMDEVICE); |