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,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 11/12] ixgbe: fix ring assignment issues for SR-IOV and drop cases
Date: Wed, 22 Jun 2011 18:44:35 -0700 [thread overview]
Message-ID: <1308793476-11596-12-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1308793476-11596-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
This change fixes the fact that we would trigger a null pointer dereference
or specify the wrong ring if the rings were restored. This change makes
certain that the DROP queue is a static value, and all other rings are
based on the ring offsets for the PF.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_ethtool.c | 2 ++
drivers/net/ixgbe/ixgbe_main.c | 8 +++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index cb59359..ac3028d 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -2722,6 +2722,8 @@ static int ixgbe_add_ethtool_fdir_entry(struct ixgbe_adapter *adapter,
/* program filters to filter memory */
err = ixgbe_fdir_write_perfect_filter_82599(hw,
&input->filter, input->sw_idx,
+ (input->action == IXGBE_FDIR_DROP_QUEUE) ?
+ IXGBE_FDIR_DROP_QUEUE :
adapter->rx_ring[input->action]->reg_idx);
if (err)
goto err_out_w_lock;
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index c03b5cc..168a5d6 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3760,9 +3760,11 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)
hlist_for_each_entry_safe(filter, node, node2,
&adapter->fdir_filter_list, fdir_node) {
ixgbe_fdir_write_perfect_filter_82599(hw,
- &filter->filter,
- filter->sw_idx,
- filter->action);
+ &filter->filter,
+ filter->sw_idx,
+ (filter->action == IXGBE_FDIR_DROP_QUEUE) ?
+ IXGBE_FDIR_DROP_QUEUE :
+ adapter->rx_ring[filter->action]->reg_idx);
}
spin_unlock(&adapter->fdir_perfect_lock);
--
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 ` [net-next 10/12] ixgbe: disable RSC when Rx checksum is off Jeff Kirsher
2011-06-23 1:44 ` Jeff Kirsher [this message]
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-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 \
/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).