aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-11-12 23:03:23 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-13 14:18:14 -0500
commit1d9daf45b474a7db7a2f850ab03def2d0721095d (patch)
treec09b82a5fa792a0f2db1c9ccaaf39591bf36aef9 /drivers/net/ethernet/intel/igb/igb.h
parented6aa10580b852e29acd48b686438fac8605a97b (diff)
igb: Update igb Tx flags to improve code efficiency
This change is meant to improve the efficiency of the Tx flags in igb by aligning them with the values that will later be written into either the cmd_type or olinfo. By doing this we are able to reduce most of these functions to either just a simple shift followed by an or in the case of cmd_type, or an and followed by an or in the case of olinfo. In order to avoid type conversion errors I also adjusted the locations where we were switching between CPU and little endian. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@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/ethernet/intel/igb/igb.h')
-rw-r--r--drivers/net/ethernet/intel/igb/igb.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index b23a6678acc9..d8fd5b63af9a 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -150,11 +150,18 @@ struct vf_data_storage {
150 150
151#define IGB_MNG_VLAN_NONE -1 151#define IGB_MNG_VLAN_NONE -1
152 152
153#define IGB_TX_FLAGS_CSUM 0x00000001 153enum igb_tx_flags {
154#define IGB_TX_FLAGS_VLAN 0x00000002 154 /* cmd_type flags */
155#define IGB_TX_FLAGS_TSO 0x00000004 155 IGB_TX_FLAGS_VLAN = 0x01,
156#define IGB_TX_FLAGS_IPV4 0x00000008 156 IGB_TX_FLAGS_TSO = 0x02,
157#define IGB_TX_FLAGS_TSTAMP 0x00000010 157 IGB_TX_FLAGS_TSTAMP = 0x04,
158
159 /* olinfo flags */
160 IGB_TX_FLAGS_IPV4 = 0x10,
161 IGB_TX_FLAGS_CSUM = 0x20,
162};
163
164/* VLAN info */
158#define IGB_TX_FLAGS_VLAN_MASK 0xffff0000 165#define IGB_TX_FLAGS_VLAN_MASK 0xffff0000
159#define IGB_TX_FLAGS_VLAN_SHIFT 16 166#define IGB_TX_FLAGS_VLAN_SHIFT 16
160 167