1. 30 10月, 2021 3 次提交
    • M
      ice: Hide bus-info in ethtool for PRs in switchdev mode · bfaaba99
      Marcin Szycik 提交于
      Disable showing bus-info information for port representors in switchdev
      mode. This fixes a bug that caused displaying wrong netdev descriptions in
      lshw tool - one port representor displayed PF branding string, and in turn
      one PF displayed a "generic" description. The bug occurs when many devices
      show the same bus-info in ethtool, which was the case in switchdev mode (PF
      and its port representors displayed the same bus-info). The bug occurs only
      if a port representor netdev appears before PF netdev in /proc/net/dev.
      
      In the examples below:
      ens6fX is PF
      ens6fXvY is VF
      ethX is port representor
      One irrelevant column was removed from output
      
      Before:
      $ sudo lshw -c net -businfo
      Bus info          Device      Description
      =========================================
      pci@0000:02:00.0  eth102       Ethernet Controller E810-XXV for SFP
      pci@0000:02:00.1  ens6f1       Ethernet Controller E810-XXV for SFP
      pci@0000:02:01.0  ens6f0v0     Ethernet Adaptive Virtual Function
      pci@0000:02:01.1  ens6f0v1     Ethernet Adaptive Virtual Function
      pci@0000:02:01.2  ens6f0v2     Ethernet Adaptive Virtual Function
      pci@0000:02:00.0  ens6f0       Ethernet interface
      
      Notice that eth102 and ens6f0 have the same bus-info and their descriptions
      are swapped.
      
      After:
      $ sudo lshw -c net -businfo
      Bus info          Device      Description
      =========================================
      pci@0000:02:00.0  ens6f0      Ethernet Controller E810-XXV for SFP
      pci@0000:02:00.1  ens6f1      Ethernet Controller E810-XXV for SFP
      pci@0000:02:01.0  ens6f0v0    Ethernet Adaptive Virtual Function
      pci@0000:02:01.1  ens6f0v1    Ethernet Adaptive Virtual Function
      pci@0000:02:01.2  ens6f0v2    Ethernet Adaptive Virtual Function
      
      Fixes: 7aae80ce ("ice: add port representor ethtool ops and stats")
      Signed-off-by: NMarcin Szycik <marcin.szycik@linux.intel.com>
      Tested-by: NSandeep Penigalapati <sandeep.penigalapati@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      bfaaba99
    • M
      ice: Clear synchronized addrs when adding VFs in switchdev mode · c79bb28e
      Marcin Szycik 提交于
      When spawning VFs in switchdev mode, internal filter list of VSIs is
      cleared, which includes MAC rules. However MAC entries stay on netdev's
      multicast list, which causes error message when bringing link up after
      spawning VFs ("Failed to delete MAC filters"). __dev_mc_sync() is
      called and tries to unsync addresses that were already removed
      internally when adding VFs.
      
      This can be reproduced with:
      1) Load ice driver
      2) Change PF to switchdev mode
      3) Bring PF link up
      4) Bring PF link down
      5) Create a VF on PF
      6) Bring PF link up
      
      Added clearing of netdev's multicast (and also unicast) list when
      spawning VFs in switchdev mode, so the state of internal rule list and
      netdev's MAC list is consistent.
      
      Fixes: 1a1c40df ("ice: set and release switchdev environment")
      Signed-off-by: NMarcin Szycik <marcin.szycik@linux.intel.com>
      Tested-by: NSandeep Penigalapati <sandeep.penigalapati@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      c79bb28e
    • B
      ice: Remove boolean vlan_promisc flag from function · 29e71f41
      Brett Creeley 提交于
      Currently, the vlan_promisc flag is used exclusively by VF VSI to
      determine whether or not to toggle VLAN pruning along with
      trusted/true-promiscuous mode. This is not needed for a couple of
      reasons. First, trusted/true-promiscuous mode is only supposed to allow
      all MAC filters within VLANs that a VF has added filters for, so VLAN
      pruning should not be disabled. Second, the boolean argument makes the
      function confusing and unintuitive. Remove this flag.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NTony Brelinski <tony.brelinski@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      29e71f41
  2. 29 10月, 2021 37 次提交