diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2010-11-16 22:26:55 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2010-11-16 22:26:55 -0500 |
commit | 33cf09c9586a0dce472ecd2aac13e8140c9ed1a1 (patch) | |
tree | add9e26fdac5fc681b785f56c88cb4b609bc0d90 /drivers/net/ixgbe/ixgbe.h | |
parent | c60fbb00f0400792adf873dbacd431885653b77d (diff) |
ixgbe: move CPU variable from ring into q_vector, add ring->q_vector
This is the start of work to sort out what belongs in the rings and what
belongs in the q_vector. Items like the CPU variable for make much more
sense in the q_vector since the CPU is a per-interrupt thing rather than a
per ring thing.
I also added a back-pointer from the ring to the q_vector.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe.h')
-rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index dc4b97e5777..e87b0ffd583 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -183,11 +183,6 @@ struct ixgbe_ring { | |||
183 | unsigned int total_bytes; | 183 | unsigned int total_bytes; |
184 | unsigned int total_packets; | 184 | unsigned int total_packets; |
185 | 185 | ||
186 | #ifdef CONFIG_IXGBE_DCA | ||
187 | /* cpu for tx queue */ | ||
188 | int cpu; | ||
189 | #endif | ||
190 | |||
191 | u16 work_limit; /* max work per interrupt */ | 186 | u16 work_limit; /* max work per interrupt */ |
192 | u16 reg_idx; /* holds the special value that gets | 187 | u16 reg_idx; /* holds the special value that gets |
193 | * the hardware register offset | 188 | * the hardware register offset |
@@ -206,6 +201,7 @@ struct ixgbe_ring { | |||
206 | unsigned int size; /* length in bytes */ | 201 | unsigned int size; /* length in bytes */ |
207 | dma_addr_t dma; /* phys. address of descriptor ring */ | 202 | dma_addr_t dma; /* phys. address of descriptor ring */ |
208 | struct rcu_head rcu; | 203 | struct rcu_head rcu; |
204 | struct ixgbe_q_vector *q_vector; /* back-pointer to host q_vector */ | ||
209 | } ____cacheline_internodealigned_in_smp; | 205 | } ____cacheline_internodealigned_in_smp; |
210 | 206 | ||
211 | enum ixgbe_ring_f_enum { | 207 | enum ixgbe_ring_f_enum { |
@@ -251,6 +247,9 @@ struct ixgbe_q_vector { | |||
251 | unsigned int v_idx; /* index of q_vector within array, also used for | 247 | unsigned int v_idx; /* index of q_vector within array, also used for |
252 | * finding the bit in EICR and friends that | 248 | * finding the bit in EICR and friends that |
253 | * represents the vector for this ring */ | 249 | * represents the vector for this ring */ |
250 | #ifdef CONFIG_IXGBE_DCA | ||
251 | int cpu; /* CPU for DCA */ | ||
252 | #endif | ||
254 | struct napi_struct napi; | 253 | struct napi_struct napi; |
255 | DECLARE_BITMAP(rxr_idx, MAX_RX_QUEUES); /* Rx ring indices */ | 254 | DECLARE_BITMAP(rxr_idx, MAX_RX_QUEUES); /* Rx ring indices */ |
256 | DECLARE_BITMAP(txr_idx, MAX_TX_QUEUES); /* Tx ring indices */ | 255 | DECLARE_BITMAP(txr_idx, MAX_TX_QUEUES); /* Tx ring indices */ |