diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2012-02-08 02:49:33 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-03-01 02:19:08 -0500 |
commit | 9e0c5648d973cfe6bb037df3fdd08903c81bdc3e (patch) | |
tree | 613316d2ab7a83b962a0175a872b98a3e2663ec7 | |
parent | bb9c5ee15b560f944a8877f60e7d3d77ad542286 (diff) |
ixgbe: Minor formatting and comment corrections for ixgbe_xmit_frame_ring
This patch is meant to address several minor issues in
ixgbe_xmit_frame_ring. Specifically it adds a comment explaining the TXSW
flag, and correctly wraps a line over 80 characters.
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>
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 4e55860fdcd4..1cf676bf12ec 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -7012,11 +7012,6 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, | |||
7012 | return NETDEV_TX_BUSY; | 7012 | return NETDEV_TX_BUSY; |
7013 | } | 7013 | } |
7014 | 7014 | ||
7015 | #ifdef CONFIG_PCI_IOV | ||
7016 | if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) | ||
7017 | tx_flags |= IXGBE_TX_FLAGS_TXSW; | ||
7018 | |||
7019 | #endif | ||
7020 | /* if we have a HW VLAN tag being added default to the HW one */ | 7015 | /* if we have a HW VLAN tag being added default to the HW one */ |
7021 | if (vlan_tx_tag_present(skb)) { | 7016 | if (vlan_tx_tag_present(skb)) { |
7022 | tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT; | 7017 | tx_flags |= vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT; |
@@ -7029,10 +7024,20 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, | |||
7029 | goto out_drop; | 7024 | goto out_drop; |
7030 | 7025 | ||
7031 | protocol = vhdr->h_vlan_encapsulated_proto; | 7026 | protocol = vhdr->h_vlan_encapsulated_proto; |
7032 | tx_flags |= ntohs(vhdr->h_vlan_TCI) << IXGBE_TX_FLAGS_VLAN_SHIFT; | 7027 | tx_flags |= ntohs(vhdr->h_vlan_TCI) << |
7028 | IXGBE_TX_FLAGS_VLAN_SHIFT; | ||
7033 | tx_flags |= IXGBE_TX_FLAGS_SW_VLAN; | 7029 | tx_flags |= IXGBE_TX_FLAGS_SW_VLAN; |
7034 | } | 7030 | } |
7035 | 7031 | ||
7032 | #ifdef CONFIG_PCI_IOV | ||
7033 | /* | ||
7034 | * Use the l2switch_enable flag - would be false if the DMA | ||
7035 | * Tx switch had been disabled. | ||
7036 | */ | ||
7037 | if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) | ||
7038 | tx_flags |= IXGBE_TX_FLAGS_TXSW; | ||
7039 | |||
7040 | #endif | ||
7036 | /* DCB maps skb priorities 0-7 onto 3 bit PCP of VLAN tag. */ | 7041 | /* DCB maps skb priorities 0-7 onto 3 bit PCP of VLAN tag. */ |
7037 | if ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) && | 7042 | if ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) && |
7038 | ((tx_flags & (IXGBE_TX_FLAGS_HW_VLAN | IXGBE_TX_FLAGS_SW_VLAN)) || | 7043 | ((tx_flags & (IXGBE_TX_FLAGS_HW_VLAN | IXGBE_TX_FLAGS_SW_VLAN)) || |