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 08/12] ixgbe: move setting RSC into a separate function
Date: Wed, 22 Jun 2011 18:44:32 -0700 [thread overview]
Message-ID: <1308793476-11596-9-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>
Move setting RSC into a separate function to allow for reuse in other
parts of the code.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_ethtool.c | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index b20609f..791b388 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -459,6 +459,21 @@ static int ixgbe_set_rx_csum(struct net_device *netdev, u32 data)
return 0;
}
+static void ixgbe_set_rsc(struct ixgbe_adapter *adapter)
+{
+ int i;
+
+ for (i = 0; i < adapter->num_rx_queues; i++) {
+ struct ixgbe_ring *ring = adapter->rx_ring[i];
+ if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
+ set_ring_rsc_enabled(ring);
+ ixgbe_configure_rscctl(adapter, ring);
+ } else {
+ ixgbe_clear_rscctl(adapter, ring);
+ }
+ }
+}
+
static u32 ixgbe_get_tx_csum(struct net_device *netdev)
{
return (netdev->features & NETIF_F_IP_CSUM) != 0;
@@ -2281,25 +2296,12 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)
} else {
adapter->flags2 ^= IXGBE_FLAG2_RSC_ENABLED;
switch (adapter->hw.mac.type) {
+ case ixgbe_mac_X540:
+ ixgbe_set_rsc(adapter);
+ break;
case ixgbe_mac_82599EB:
need_reset = true;
break;
- case ixgbe_mac_X540: {
- int i;
- for (i = 0; i < adapter->num_rx_queues; i++) {
- struct ixgbe_ring *ring =
- adapter->rx_ring[i];
- if (adapter->flags2 &
- IXGBE_FLAG2_RSC_ENABLED) {
- ixgbe_configure_rscctl(adapter,
- ring);
- } else {
- ixgbe_clear_rscctl(adapter,
- ring);
- }
- }
- }
- break;
default:
break;
}
--
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 ` Jeff Kirsher [this message]
2011-06-23 1:44 ` [net-next 09/12] ixgbe: move reset code into a separate function Jeff Kirsher
2011-06-23 1:44 ` [net-next 10/12] ixgbe: disable RSC when Rx checksum is off Jeff Kirsher
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-9-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).