summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-09-25 00:30:52 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-10-19 04:27:30 -0700
commit1a1c225b9463038ac68b369ef05e4ee7fd9c82a5 (patch)
treedc79d408e1e8bdc756315b3ded1d2097e298015e /drivers/net/ethernet/intel/igb/igb.h
parentb534550a17cda69a1d62acc18fff33370b5eee5b (diff)
downloadlinux-stable-1a1c225b9463038ac68b369ef05e4ee7fd9c82a5.tar.gz
linux-stable-1a1c225b9463038ac68b369ef05e4ee7fd9c82a5.tar.bz2
linux-stable-1a1c225b9463038ac68b369ef05e4ee7fd9c82a5.zip
igb: Do not use header split, instead receive all frames into a single buffer
This change makes it so that we no longer use header split. The idea is to reduce partial cache line writes by hardware when handling frames larger then header size. We can compensate for the extra overhead of having to memcpy the header buffer by avoiding the cache misses seen by leaving an full skb allocated and sitting on the ring. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb.h')
-rw-r--r--drivers/net/ethernet/intel/igb/igb.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index f6a1cd9d72a6..72ab9ac34a30 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -174,11 +174,9 @@ struct igb_tx_buffer {
};
struct igb_rx_buffer {
- struct sk_buff *skb;
dma_addr_t dma;
struct page *page;
- dma_addr_t page_dma;
- u32 page_offset;
+ unsigned int page_offset;
};
struct igb_tx_queue_stats {
@@ -251,6 +249,7 @@ struct igb_ring {
};
/* RX */
struct {
+ struct sk_buff *skb;
struct igb_rx_queue_stats rx_stats;
struct u64_stats_sync rx_syncp;
};
@@ -451,13 +450,11 @@ static inline void igb_ptp_rx_hwtstamp(struct igb_q_vector *q_vector,
union e1000_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{
- if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) {
- igb_ptp_rx_pktstamp(q_vector, skb->data, skb);
- skb_pull(skb, IGB_TS_HDR_LEN);
- } else if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TS)) {
+ if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TS) &&
+ !igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP))
igb_ptp_rx_rgtstamp(q_vector, skb);
- }
}
+
extern int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
struct ifreq *ifr, int cmd);
#endif /* CONFIG_IGB_PTP */