jme: Move uncommonly accessed fields to the end of the struct
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 9 Oct 2012 08:46:31 +0000 (16:46 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 9 Oct 2012 08:46:31 +0000 (16:46 +0800)
sys/dev/netif/jme/if_jmevar.h

index 37a63b1..349ab25 100644 (file)
@@ -150,10 +150,6 @@ struct jme_rxdata {
        struct jme_rxdesc       *jme_rxdesc;
 
        struct jme_desc         *jme_rx_ring;
-       bus_addr_t              jme_rx_ring_paddr;
-       bus_dma_tag_t           jme_rx_ring_tag;
-       bus_dmamap_t            jme_rx_ring_map;
-
        int                     jme_rx_cons;
        int                     jme_rx_desc_cnt;
 
@@ -163,24 +159,14 @@ struct jme_rxdata {
 
        u_long                  jme_rx_pkt;
        u_long                  jme_rx_emp;
+
+       bus_addr_t              jme_rx_ring_paddr;
+       bus_dma_tag_t           jme_rx_ring_tag;
+       bus_dmamap_t            jme_rx_ring_map;
 } __cachealign;
 
 struct jme_chain_data {
        /*
-        * Top level tags
-        */
-       bus_dma_tag_t           jme_ring_tag;   /* parent ring tag */
-       bus_dma_tag_t           jme_buffer_tag; /* parent mbuf/ssb tag */
-
-       /*
-        * Shadow status block
-        */
-       struct jme_ssb          *jme_ssb_block;
-       bus_addr_t              jme_ssb_block_paddr;
-       bus_dma_tag_t           jme_ssb_tag;
-       bus_dmamap_t            jme_ssb_map;
-
-       /*
         * TX ring/descs
         */
        struct lwkt_serialize   jme_tx_serialize;
@@ -189,17 +175,32 @@ struct jme_chain_data {
        struct jme_txdesc       *jme_txdesc;
 
        struct jme_desc         *jme_tx_ring;
-       bus_addr_t              jme_tx_ring_paddr;
-       bus_dma_tag_t           jme_tx_ring_tag;
-       bus_dmamap_t            jme_tx_ring_map;
 
        int                     jme_tx_prod;
        int                     jme_tx_cons;
        int                     jme_tx_cnt;
        int                     jme_tx_desc_cnt;
 
+       bus_addr_t              jme_tx_ring_paddr;
+       bus_dma_tag_t           jme_tx_ring_tag;
+       bus_dmamap_t            jme_tx_ring_map;
+
        int                     jme_rx_ring_cnt;
        struct jme_rxdata       jme_rx_data[JME_NRXRING_MAX];
+
+       /*
+        * Top level tags
+        */
+       bus_dma_tag_t           jme_ring_tag;   /* parent ring tag */
+       bus_dma_tag_t           jme_buffer_tag; /* parent mbuf/ssb tag */
+
+       /*
+        * Shadow status block
+        */
+       struct jme_ssb          *jme_ssb_block;
+       bus_addr_t              jme_ssb_block_paddr;
+       bus_dma_tag_t           jme_ssb_tag;
+       bus_dmamap_t            jme_ssb_map;
 } __cachealign;
 
 struct jme_msix_data {