]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ixgbe: Update ixgbe Tx flags to improve code efficiency
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 7 Nov 2012 02:34:28 +0000 (02:34 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 19 Jan 2013 12:13:45 +0000 (04:13 -0800)
commit472148c320c0d11245932ba1315bc4ec0667ed57
tree238e269a5b81fee537bfdbf699ddf02b97ace89d
parentc44f5f516e0b830f560ade66847433f88a4bcc3a
ixgbe: Update ixgbe Tx flags to improve code efficiency

This change is meant to improve the efficiency of the Tx flags in ixgbe 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.

To do this I also needed to change the logic and/or drop some flags.  I
dropped the IXGBE_TX_FLAGS_FSO and it was replaced by IXGBE_TX_FLAGS_TSO since
the only place it was ever checked was in conjunction with IXGBE_TX_FLAGS_TSO.
I replaced IXGBE_TX_FLAGS_TXSW with IXGBE_TX_FLAGS_CC, this way we have a
clear point for what the flag is meant to do.  Finally the
IXGBE_TX_FLAGS_NO_IFCS was dropped since were are already carrying the data
for that flag in the skb.  Instead we can just check the bitflag in the skb.

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: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe.h
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c