ixgbe: update set_rx_mode to fix issues w/ macvlan
Subsystems (2)
PATCH 1/1 ixgbe: update set_rx_mode to fix issues w/ macvlan
From: Alexander Duyck <[email protected]>
This change corrects issues where macvlan was not correctly triggering promiscuous mode on ixgbe due to the filters not being correctly set. It also corrects the fact that VF rar filters were being overwritten when the PF was reset.
CC Shirley Ma <[email protected]>
Signed-off-by Alexander Duyck <[email protected]>
Tested-by Emil Tantilov <[email protected]>
Signed-off-by Jeff Kirsher <[email protected]>
---
drivers/net/ixgbe/ixgbe.h | 1 drivers/net/ixgbe/ixgbe_main.c | 88 +++++++++++++++++++++++++++++++++------ drivers/net/ixgbe/ixgbe_sriov.c | 16 ++----- 3 files changed, 79 insertions(+), 26 deletions(-)
drivers/net/ixgbe/ixgbe.h +0 -1
@@ -110,7 +110,6 @@ struct vf_data_storage {u16 vlans_enabled;bool clear_to_send;bool pf_set_mac; -int rar;u16 pf_vlan;/* When set, guest VLAN config not allowed. */ u16 pf_qos; };
drivers/net/ixgbe/ixgbe_main.c +75 -13
119 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_sriov.c +4 -12
@@ -137,6 +137,7 @@ static void ixgbe_set_vmvir(struct ixgbe_adapter *adapter, u32 vid, u32 vf)inline void ixgbe_vf_reset_event (struct ixgbe_adapter *adapter,u32 vf) {struct ixgbe_hw *hw = &adapter->hw; +int rar_entry = hw->mac.num_rar_entries - (vf +1 );/* reset offloads to defaults */ if (adapter->vfinfo[vf].pf_vlan) {
@@ -158,26 +159,17 @@ inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)/* Flush and reset the mta with the new values */ ixgbe_set_rx_mode (adapter->netdev); -if (adapter->vfinfo[vf].rar >0 ) { - adapter->hw.mac.ops.clear_rar (&adapter->hw, - adapter->vfinfo[vf].rar); - adapter->vfinfo[vf].rar =-1 ; - } + hw->mac.ops.clear_rar (hw, rar_entry); }int ixgbe_set_vf_mac (struct ixgbe_adapter *adapter,int vf,unsigned char *mac_addr) {struct ixgbe_hw *hw = &adapter->hw; - - adapter->vfinfo[vf].rar = hw->mac.ops.set_rar (hw, vf +1 , mac_addr, - vf,IXGBE_RAH_AV ); -if (adapter->vfinfo[vf].rar <0 ) { -e_err ("Could not set MAC Filter for VF %d\n" , vf); -return -1 ; - } +int rar_entry = hw->mac.num_rar_entries - (vf +1 );memcpy (adapter->vfinfo[vf].vf_mac_addresses, mac_addr,6 ); + hw->mac.ops.set_rar (hw, rar_entry, mac_addr, vf,IXGBE_RAH_AV );return 0 ; }
From: Jeff Kirsher <[email protected]>
Date: Tue, 15 Jun 2010 12:25:48 -0700
Quoted 11 lines
From: Alexander Duyck <[email protected]>
This change corrects issues where macvlan was not correctly triggering promiscuous mode on ixgbe due to the filters not being correctly set. It also corrects the fact that VF rar filters were being overwritten when the PF was reset.
CC Shirley Ma <[email protected]>Signed-off-by Alexander Duyck <[email protected]>Tested-by Emil Tantilov <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.