• Alexander Duyck's avatar
    ixgbe: Update ixgbe Tx flags to improve code efficiency · 472148c3
    Alexander Duyck authored
    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: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
    Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    472148c3
ixgbe.h 24.1 KB