tg3: Reorg tg3_napi members
authorMatt Carlson <mcarlson@broadcom.com>
Wed, 24 Nov 2010 08:31:49 +0000 (08:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Nov 2010 19:06:18 +0000 (11:06 -0800)
This patch reorders and realigns the tg3_napi members for a ~3-4%
performance improvement on small packet performance tests.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.h

index 410703684e39855cc09a76015c46771d6a419828..2938d18d12f7cc53a17d2e0a71a38af56a9f0852 100644 (file)
@@ -2715,17 +2715,17 @@ struct tg3_napi {
        u32                             last_irq_tag;
        u32                             int_mbox;
        u32                             coal_now;
-       u32                             tx_prod;
-       u32                             tx_cons;
-       u32                             tx_pending;
-       u32                             prodmbox;
 
-       u32                             consmbox;
+       u32                             consmbox ____cacheline_aligned;
        u32                             rx_rcb_ptr;
        u16                             *rx_rcb_prod_idx;
        struct tg3_rx_prodring_set      prodring;
-
        struct tg3_rx_buffer_desc       *rx_rcb;
+
+       u32                             tx_prod ____cacheline_aligned;
+       u32                             tx_cons;
+       u32                             tx_pending;
+       u32                             prodmbox;
        struct tg3_tx_buffer_desc       *tx_ring;
        struct ring_info                *tx_buffers;