From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Emil Tantilov <emil.s.tantilov@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 10/12] ixgbe: disable RSC when Rx checksum is off
Date: Wed, 22 Jun 2011 18:44:34 -0700 [thread overview]
Message-ID: <1308793476-11596-11-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1308793476-11596-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Emil Tantilov <emil.s.tantilov@intel.com>
Disabling Rx checksumming leads to performance degradation due to
RSC causing packets to have incorrect checksums.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_ethtool.c | 44 +++++++++++++++++++++++++++---------
1 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index acf95ec..cb59359 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -458,17 +458,6 @@ static u32 ixgbe_get_rx_csum(struct net_device *netdev)
return adapter->flags & IXGBE_FLAG_RX_CSUM_ENABLED;
}
-static int ixgbe_set_rx_csum(struct net_device *netdev, u32 data)
-{
- struct ixgbe_adapter *adapter = netdev_priv(netdev);
- if (data)
- adapter->flags |= IXGBE_FLAG_RX_CSUM_ENABLED;
- else
- adapter->flags &= ~IXGBE_FLAG_RX_CSUM_ENABLED;
-
- return 0;
-}
-
static void ixgbe_set_rsc(struct ixgbe_adapter *adapter)
{
int i;
@@ -484,6 +473,39 @@ static void ixgbe_set_rsc(struct ixgbe_adapter *adapter)
}
}
+static int ixgbe_set_rx_csum(struct net_device *netdev, u32 data)
+{
+ struct ixgbe_adapter *adapter = netdev_priv(netdev);
+ bool need_reset = false;
+
+ if (data) {
+ adapter->flags |= IXGBE_FLAG_RX_CSUM_ENABLED;
+ } else {
+ adapter->flags &= ~IXGBE_FLAG_RX_CSUM_ENABLED;
+
+ if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE) {
+ adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED;
+ netdev->features &= ~NETIF_F_LRO;
+ }
+
+ switch (adapter->hw.mac.type) {
+ case ixgbe_mac_X540:
+ ixgbe_set_rsc(adapter);
+ break;
+ case ixgbe_mac_82599EB:
+ need_reset = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (need_reset)
+ ixgbe_do_reset(netdev);
+
+ return 0;
+}
+
static u32 ixgbe_get_tx_csum(struct net_device *netdev)
{
return (netdev->features & NETIF_F_IP_CSUM) != 0;
--
1.7.5.4
next prev parent reply other threads:[~2011-06-23 1:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 1:44 [net-next 00/12][pull request] Intel Wired LAN Driver Update Jeff Kirsher
2011-06-23 1:44 ` [net-next 01/12] ixgbe: remove ntuple filtering Jeff Kirsher
2011-06-23 1:44 ` [net-next 02/12] ixgbe: fix flags relating to perfect filters to support coexistence Jeff Kirsher
2011-06-23 1:44 ` [net-next 03/12] ixgbe: update perfect filter framework to support retaining filters Jeff Kirsher
2011-06-23 1:44 ` [net-next 04/12] ixgbe: add basic support for setting and getting nfc controls Jeff Kirsher
2011-06-23 1:44 ` [net-next 05/12] ixgbe: add support for displaying ntuple filters via the nfc interface Jeff Kirsher
2011-06-23 1:44 ` [net-next 06/12] ixgbe: add support for nfc addition and removal of filters Jeff Kirsher
2011-06-23 1:44 ` [net-next 07/12] ixgbe: add support for modifying UDP RSS flow hash options Jeff Kirsher
2011-06-23 2:25 ` Ben Hutchings
2011-06-24 3:57 ` Jeff Kirsher
2011-06-23 1:44 ` [net-next 08/12] ixgbe: move setting RSC into a separate function Jeff Kirsher
2011-06-23 1:44 ` [net-next 09/12] ixgbe: move reset code " Jeff Kirsher
2011-06-23 1:44 ` Jeff Kirsher [this message]
2011-06-23 1:44 ` [net-next 11/12] ixgbe: fix ring assignment issues for SR-IOV and drop cases Jeff Kirsher
2011-06-23 1:44 ` [net-next 12/12] ixgbe: update driver version string 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=1308793476-11596-11-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=emil.s.tantilov@intel.com \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
/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).