From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Alexander Duyck <alexander.h.duyck@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 07/10] ixgbe: Minor formatting and comment corrections for ixgbe_xmit_frame_ring
Date: Fri, 2 Mar 2012 18:24:25 -0800 [thread overview]
Message-ID: <1330741468-23900-12-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1330741468-23900-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
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>
---
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 4e55860..1cf676b 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,
return NETDEV_TX_BUSY;
}
-#ifdef CONFIG_PCI_IOV
- if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
- tx_flags |= IXGBE_TX_FLAGS_TXSW;
-
-#endif
/* if we have a HW VLAN tag being added default to the HW one */
if (vlan_tx_tag_present(skb)) {
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,
goto out_drop;
protocol = vhdr->h_vlan_encapsulated_proto;
- tx_flags |= ntohs(vhdr->h_vlan_TCI) << IXGBE_TX_FLAGS_VLAN_SHIFT;
+ tx_flags |= ntohs(vhdr->h_vlan_TCI) <<
+ IXGBE_TX_FLAGS_VLAN_SHIFT;
tx_flags |= IXGBE_TX_FLAGS_SW_VLAN;
}
+#ifdef CONFIG_PCI_IOV
+ /*
+ * Use the l2switch_enable flag - would be false if the DMA
+ * Tx switch had been disabled.
+ */
+ if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
+ tx_flags |= IXGBE_TX_FLAGS_TXSW;
+
+#endif
/* DCB maps skb priorities 0-7 onto 3 bit PCP of VLAN tag. */
if ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) &&
((tx_flags & (IXGBE_TX_FLAGS_HW_VLAN | IXGBE_TX_FLAGS_SW_VLAN)) ||
--
1.7.7.6
next prev parent reply other threads:[~2012-03-03 2:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-03 2:24 [net-next 0/4][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-03-03 2:24 ` [net-next 1/4] e100: Fix rx-over-length statistics Jeff Kirsher
2012-03-03 2:24 ` [net-next 01/10] e100: Support RXFCS feature flag Jeff Kirsher
2012-03-03 2:24 ` [net-next 2/4] e100: Show short v/s long rx length errors in ethtool stats Jeff Kirsher
2012-03-03 2:24 ` [net-next 02/10] e100: Support sending custom Ethernet CRC Jeff Kirsher
2012-03-03 2:24 ` [net-next 03/10] e100: Support RXALL feature flag Jeff Kirsher
2012-03-03 2:24 ` [net-next 3/4] ixgbe: dcb: check setup_tc return codes Jeff Kirsher
2012-03-03 2:24 ` [net-next 04/10] e1000e: cleanup incorrect filename in comment Jeff Kirsher
2012-03-03 2:24 ` [net-next 4/4] net: dcb: getnumtcs()/setnumtcs() should return an int Jeff Kirsher
2012-03-03 2:24 ` [net-next 05/10] e1000e: cleanup whitespace and indentation Jeff Kirsher
2012-03-03 2:24 ` [net-next 06/10] e1000e: use msleep instead of mdelay Jeff Kirsher
2012-03-03 2:24 ` Jeff Kirsher [this message]
2012-03-03 2:24 ` [net-next 08/10] ixgbe: fix spelling errors Jeff Kirsher
2012-03-03 2:24 ` [net-next 09/10] ixgbe: Fix comments that are out of date or formatted incorrectly Jeff Kirsher
2012-03-03 2:24 ` [net-next 10/10] rtnetlink: Fix VF IFLA policy Jeff Kirsher
2012-03-03 2:27 ` [net-next 0/4][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
-- strict thread matches above, loose matches on Subject: below --
2012-03-01 7:32 [net-next 00/10][pull " Jeff Kirsher
2012-03-01 7:33 ` [net-next 07/10] ixgbe: Minor formatting and comment corrections for ixgbe_xmit_frame_ring Jeff Kirsher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330741468-23900-12-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).