OSDN Git Service

be2net: reorder fields in be_eq_obj structure
authorIvan Vecera <cera@cera.cz>
Tue, 10 Jul 2018 20:59:44 +0000 (22:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jul 2018 07:03:30 +0000 (00:03 -0700)
Re-order fields in struct be_eq_obj to ensure that .napi field begins
at start of cache-line. Also the .adapter field is moved to the first
cache-line next to .q field and 3 fields (idx,msi_idx,spurious_intr)
and the 4-bytes hole to 3rd cache-line.

Signed-off-by: Ivan Vecera <cera@cera.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h

index e71e5e5..716b4bc 100644 (file)
@@ -186,11 +186,11 @@ static inline void queue_tail_inc(struct be_queue_info *q)
 struct be_eq_obj {
        struct be_queue_info q;
 
+       struct be_adapter *adapter;
+       struct napi_struct napi;
        u8 idx;                 /* array index */
        u8 msix_idx;
        u16 spurious_intr;
-       struct napi_struct napi;
-       struct be_adapter *adapter;
        cpumask_var_t  affinity_mask;
 } ____cacheline_aligned_in_smp;