Patchwork [net-next,v0,5/5] ixgbe: allow RAR table to be updated in promisc mode

login
register
mail settings
Submitter John Fastabend
Date March 19, 2012, 6:52 a.m.
Message ID <20120319065214.10959.12406.stgit@jf-dev1-dcblab>
Download mbox | patch
Permalink /patch/147475/
State Deferred
Delegated to: David Miller
Headers show

Comments

John Fastabend - March 19, 2012, 6:52 a.m.
This allows RAR table updates while in promiscuous. With
SR-IOV enabled it is valuable to allow the RAR table to
be updated even when in promisc mode to configure forwarding

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---

 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Kirsher - March 19, 2012, 10:44 p.m.
On Sun, 2012-03-18 at 23:52 -0700, Fastabend, John R wrote:
> This allows RAR table updates while in promiscuous. With
> SR-IOV enabled it is valuable to allow the RAR table to
> be updated even when in promisc mode to configure forwarding
> 
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> ---
> 
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   21
> +++++++++++----------
>  1 files changed, 11 insertions(+), 10 deletions(-) 

Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Patch

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 32adb4f..d1925b5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -3400,16 +3400,17 @@  void ixgbe_set_rx_mode(struct net_device *netdev)
 		}
 		ixgbe_vlan_filter_enable(adapter);
 		hw->addr_ctrl.user_set_promisc = false;
-		/*
-		 * Write addresses to available RAR registers, if there is not
-		 * sufficient space to store all the addresses then enable
-		 * unicast promiscuous mode
-		 */
-		count = ixgbe_write_uc_addr_list(netdev);
-		if (count < 0) {
-			fctrl |= IXGBE_FCTRL_UPE;
-			vmolr |= IXGBE_VMOLR_ROPE;
-		}
+	}
+
+	/*
+	 * Write addresses to available RAR registers, if there is not
+	 * sufficient space to store all the addresses then enable
+	 * unicast promiscuous mode
+	 */
+	count = ixgbe_write_uc_addr_list(netdev);
+	if (count < 0) {
+		fctrl |= IXGBE_FCTRL_UPE;
+		vmolr |= IXGBE_VMOLR_ROPE;
 	}
 
 	if (adapter->num_vfs) {