netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
	Greg Rose <gregory.v.rose@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 PATCH 1/7] ixgbe: Set the correct pool when VLANs are added in SR-IOV mode.
Date: Sat, 23 Jan 2010 00:45:43 -0800	[thread overview]
Message-ID: <20100123084457.9865.51853.stgit@localhost.localdomain> (raw)

From: Greg Rose <gregory.v.rose@intel.com>

When VFs are allocated (as indicated by adapter->num_vfs is non-zero) then
the PF pool is no longer zero.  Instead it will be the same as the number
of VFs allocated.  When setting the VLVF entry for the PF we need to use
the correct pool otherwise the PF will get VLAN packets from the wire
because the packet will pass VFTA filtering and the PF has the default
pool, but it will not get VLAN packets from the VFs because it has
not set the correct pool bit in the VLVF entry.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 81971ed..2091658 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2432,15 +2432,17 @@ static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
 {
 	struct ixgbe_adapter *adapter = netdev_priv(netdev);
 	struct ixgbe_hw *hw = &adapter->hw;
+	int pool_ndx = adapter->num_vfs;
 
 	/* add VID to filter table */
-	hw->mac.ops.set_vfta(&adapter->hw, vid, 0, true);
+	hw->mac.ops.set_vfta(&adapter->hw, vid, pool_ndx, true);
 }
 
 static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
 {
 	struct ixgbe_adapter *adapter = netdev_priv(netdev);
 	struct ixgbe_hw *hw = &adapter->hw;
+	int pool_ndx = adapter->num_vfs;
 
 	if (!test_bit(__IXGBE_DOWN, &adapter->state))
 		ixgbe_irq_disable(adapter);
@@ -2451,7 +2453,7 @@ static void ixgbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
 		ixgbe_irq_enable(adapter);
 
 	/* remove VID from filter table */
-	hw->mac.ops.set_vfta(&adapter->hw, vid, 0, false);
+	hw->mac.ops.set_vfta(&adapter->hw, vid, pool_ndx, false);
 }
 
 static void ixgbe_vlan_rx_register(struct net_device *netdev,


             reply	other threads:[~2010-01-23  8:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-23  8:45 Jeff Kirsher [this message]
2010-01-23  8:46 ` [net-next-2.6 PATCH 2/7] ixgbe: Remove unused emulation MAC storage from the per VF data structure Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  8:46 ` [net-next-2.6 PATCH 3/7] ixgbe: Allow the VF driver to be loaded before the PF driver Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  8:46 ` [net-next-2.6 PATCH 4/7] ixgbe: Improve reset coordination between the PF and the VF Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  8:47 ` [net-next-2.6 PATCH 5/7] ixgbevf: Take action when the PF notifies the VF it is resetting Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  8:47 ` [net-next-2.6 PATCH 6/7] ixgbevf: Fix panics in the VF driver Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  8:47 ` [net-next-2.6 PATCH 7/7] ixgbevf: Tell network stack to stop tx when the VF detects PF reset Jeff Kirsher
2010-01-23  9:14   ` David Miller
2010-01-23  9:14 ` [net-next-2.6 PATCH 1/7] ixgbe: Set the correct pool when VLANs are added in SR-IOV mode David Miller

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=20100123084457.9865.51853.stgit@localhost.localdomain \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=gregory.v.rose@intel.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).