aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-10-27 11:52:46 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-28 04:20:30 -0400
commit85ad76b2f9c4956ec90c86298b22bb35c326e772 (patch)
treea8ed31c11c1ba8da38ad8a357b29410e737be975 /drivers/net/igb/igb.h
parent04a5fcaaf0e12d066411aa54e42591952aa18da7 (diff)
igb: add a flags value to the ring
This patch adds a flags value to the ring that cleans up some of the last remaining items from the ring in order to help seperate it from the adapter struct. By implementing these flags it becomes possible for different rings to support different functions such as rx checksumming. Signed-off-by: Alexander Duyck <alexander.h.duyck@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/igb/igb.h')
-rw-r--r--drivers/net/igb/igb.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h
index 6a67fa2e6007..0c30c5e375c7 100644
--- a/drivers/net/igb/igb.h
+++ b/drivers/net/igb/igb.h
@@ -192,6 +192,8 @@ struct igb_ring {
192 unsigned int total_bytes; 192 unsigned int total_bytes;
193 unsigned int total_packets; 193 unsigned int total_packets;
194 194
195 u32 flags;
196
195 union { 197 union {
196 /* TX */ 198 /* TX */
197 struct { 199 struct {
@@ -206,6 +208,13 @@ struct igb_ring {
206 }; 208 };
207}; 209};
208 210
211#define IGB_RING_FLAG_RX_CSUM 0x00000001 /* RX CSUM enabled */
212#define IGB_RING_FLAG_RX_SCTP_CSUM 0x00000002 /* SCTP CSUM offload enabled */
213
214#define IGB_RING_FLAG_TX_CTX_IDX 0x00000001 /* HW requires context index */
215
216#define IGB_ADVTXD_DCMD (E1000_TXD_CMD_EOP | E1000_TXD_CMD_RS)
217
209#define E1000_RX_DESC_ADV(R, i) \ 218#define E1000_RX_DESC_ADV(R, i) \
210 (&(((union e1000_adv_rx_desc *)((R).desc))[i])) 219 (&(((union e1000_adv_rx_desc *)((R).desc))[i]))
211#define E1000_TX_DESC_ADV(R, i) \ 220#define E1000_TX_DESC_ADV(R, i) \
@@ -245,7 +254,6 @@ struct igb_adapter {
245 /* TX */ 254 /* TX */
246 struct igb_ring *tx_ring; /* One per active queue */ 255 struct igb_ring *tx_ring; /* One per active queue */
247 unsigned long tx_queue_len; 256 unsigned long tx_queue_len;
248 u32 txd_cmd;
249 u32 gotc; 257 u32 gotc;
250 u64 gotc_old; 258 u64 gotc_old;
251 u64 tpt_old; 259 u64 tpt_old;
@@ -303,8 +311,6 @@ struct igb_adapter {
303#define IGB_FLAG_HAS_MSI (1 << 0) 311#define IGB_FLAG_HAS_MSI (1 << 0)
304#define IGB_FLAG_DCA_ENABLED (1 << 1) 312#define IGB_FLAG_DCA_ENABLED (1 << 1)
305#define IGB_FLAG_QUAD_PORT_A (1 << 2) 313#define IGB_FLAG_QUAD_PORT_A (1 << 2)
306#define IGB_FLAG_NEED_CTX_IDX (1 << 3)
307#define IGB_FLAG_RX_CSUM_DISABLED (1 << 4)
308 314
309enum e1000_state_t { 315enum e1000_state_t {
310 __IGB_TESTING, 316 __IGB_TESTING,