aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/tg3.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-11-18 01:47:01 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-21 16:10:31 -0500
commit9205fd9ccab8ef51ad771c1917eed7b2f2225d45 (patch)
tree7566edecf8ad6edfb4affea5976b0176a316bbab /drivers/net/ethernet/broadcom/tg3.h
parent37f07023d30708b5da091fe6d6be9b60783c6d82 (diff)
tg3: switch to build_skb() infrastructure
This is very similar to bnx2x conversion, but simpler since no special alignement is required, so goal was not to reduce skb truesize. Using build_skb() reduces cache line misses in the driver, since we use cache hot skb instead of cold ones. Number of in-flight sk_buff structures is lower, they are more likely recycled in SLUB caches while still hot. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Matt Carlson <mcarlson@broadcom.com> CC: Michael Chan <mchan@broadcom.com> CC: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.h')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
index 94b4bd049a3..8e2f380f893 100644
--- a/drivers/net/ethernet/broadcom/tg3.h
+++ b/drivers/net/ethernet/broadcom/tg3.h
@@ -2662,9 +2662,13 @@ struct tg3_hw_stats {
2662/* 'mapping' is superfluous as the chip does not write into 2662/* 'mapping' is superfluous as the chip does not write into
2663 * the tx/rx post rings so we could just fetch it from there. 2663 * the tx/rx post rings so we could just fetch it from there.
2664 * But the cache behavior is better how we are doing it now. 2664 * But the cache behavior is better how we are doing it now.
2665 *
2666 * This driver uses new build_skb() API :
2667 * RX ring buffer contains pointer to kmalloc() data only,
2668 * skb are built only after Hardware filled the frame.
2665 */ 2669 */
2666struct ring_info { 2670struct ring_info {
2667 struct sk_buff *skb; 2671 u8 *data;
2668 DEFINE_DMA_UNMAP_ADDR(mapping); 2672 DEFINE_DMA_UNMAP_ADDR(mapping);
2669}; 2673};
2670 2674