diff options
author | Shannon Nelson <shannon.nelson@intel.com> | 2009-02-24 19:36:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-24 19:36:38 -0500 |
commit | c7e4358ae8e49f85a4d528366046da26b36a712f (patch) | |
tree | f9112dea897b430e843dc319866984935e2d5000 /drivers/net/ixgbe | |
parent | 5325a7bf92d5bcac39dbefdfcc214379d17f3d3a (diff) |
ixgbe: Move ring features into an enum, allowing easier future maintenance
From: Shannon Nelson <shannon.nelson@intel.com>
The ring_feature member of ixgbe_adapter is statically allocated based on
the supported features of the device. When a new feature is added, we need
to manually update the static allocation. This patch makes the feature
list an enum, eliminating the need for multiple updates to the code when
adding a new feature.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index e98ace8c578d..c0e56aab5489 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -148,9 +148,15 @@ struct ixgbe_ring { | |||
148 | u16 rx_buf_len; | 148 | u16 rx_buf_len; |
149 | }; | 149 | }; |
150 | 150 | ||
151 | #define RING_F_DCB 0 | 151 | enum ixgbe_ring_f_enum { |
152 | #define RING_F_VMDQ 1 | 152 | RING_F_NONE = 0, |
153 | #define RING_F_RSS 2 | 153 | RING_F_DCB, |
154 | RING_F_VMDQ, | ||
155 | RING_F_RSS, | ||
156 | |||
157 | RING_F_ARRAY_SIZE /* must be last in enum set */ | ||
158 | }; | ||
159 | |||
154 | #define IXGBE_MAX_DCB_INDICES 8 | 160 | #define IXGBE_MAX_DCB_INDICES 8 |
155 | #define IXGBE_MAX_RSS_INDICES 16 | 161 | #define IXGBE_MAX_RSS_INDICES 16 |
156 | #define IXGBE_MAX_VMDQ_INDICES 16 | 162 | #define IXGBE_MAX_VMDQ_INDICES 16 |
@@ -249,7 +255,7 @@ struct ixgbe_adapter { | |||
249 | u64 non_eop_descs; | 255 | u64 non_eop_descs; |
250 | int num_msix_vectors; | 256 | int num_msix_vectors; |
251 | int max_msix_q_vectors; /* true count of q_vectors for device */ | 257 | int max_msix_q_vectors; /* true count of q_vectors for device */ |
252 | struct ixgbe_ring_feature ring_feature[3]; | 258 | struct ixgbe_ring_feature ring_feature[RING_F_ARRAY_SIZE]; |
253 | struct msix_entry *msix_entries; | 259 | struct msix_entry *msix_entries; |
254 | 260 | ||
255 | u64 rx_hdr_split; | 261 | u64 rx_hdr_split; |