1. 13 2月, 2020 3 次提交
  2. 04 1月, 2020 4 次提交
    • B
      ice: Enable ip link show on the PF to display VF unicast MAC(s) · ed4c068d
      Brett Creeley 提交于
      Currently when there are SR-IOV VF(s) and the user does "ip link show <pf
      interface>" the VF unicast MAC addresses all show 00:00:00:00:00:00
      if the unicast MAC was set via VIRTCHNL (i.e. not administratively set
      by the host PF).
      
      This is misleading to the host administrator. Fix this by setting the
      VF's dflt_lan_addr.addr when the VF's unicast MAC address is
      configured via VIRTCHNL. There are a couple cases where we don't allow
      the dflt_lan_addr.addr field to be written. First, If the VF's
      pf_set_mac field is true and the VF is not trusted, then we don't allow
      the dflt_lan_addr.addr to be modified. Second, if the
      dflt_lan_addr.addr has already been set (i.e. via VIRTCHNL).
      
      Also a small refactor was done to separate the flow for add and delete
      MAC addresses in order to simplify the logic for error conditions
      and set/clear the VF's dflt_lan_addr.addr field.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ed4c068d
    • B
      ice: Fix VF link state when it's IFLA_VF_LINK_STATE_AUTO · 26a91525
      Brett Creeley 提交于
      Currently the flow for ice_set_vf_link_state() is not configuring link
      the same as all other VF link configuration flows. Fix this by only
      setting the necessary VF members in ice_set_vf_link_state() and then
      call ice_vc_notify_link_state() to actually configure link for the
      VF. This made ice_set_pfe_link_forced() unnecessary, so it was
      deleted. Also, this commonizes the link flows for the VF to all call
      ice_vc_notify_link_state().
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      26a91525
    • B
      ice: Add ice_for_each_vf() macro · 005881bc
      Brett Creeley 提交于
      Currently we do "for (i = 0; i < pf->num_alloc_vfs; i++)" all over the
      place. Many other places use macros to contain this repeated for loop,
      So create the macro ice_for_each_vf(pf, i) that does the same thing.
      
      There were a couple places we were using one loop variable and a VF
      iterator, which were changed to using a local variable within the
      ice_for_each_vf() macro.
      
      Also in ice_alloc_vfs() we were setting pf->num_alloc_vfs after doing
      "for (i = 0; i < num_alloc_vfs; i++)". Instead assign pf->num_alloc_vfs
      right after allocating memory for the pf->vf array.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      005881bc
    • B
      ice: Fix VF spoofchk · cd6d6b83
      Brett Creeley 提交于
      There are many things wrong with the function
      ice_set_vf_spoofchk().
      
      1. The VSI being modified is the PF VSI, not the VF VSI.
      2. We are enabling Rx VLAN pruning instead of Tx VLAN anti-spoof.
      3. The spoofchk setting for each VF is not initialized correctly
         or re-initialized correctly on reset.
      
      To fix [1] we need to make sure we are modifying the VF VSI.
      This is done by using the vf->lan_vsi_idx to index into the PF's
      VSI array.
      
      To fix [2] replace setting Rx VLAN pruning in ice_set_vf_spoofchk()
      with setting Tx VLAN anti-spoof.
      
      To Fix [3] we need to make sure the initial VSI settings match what
      is done in ice_set_vf_spoofchk() for spoofchk=on. Also make sure
      this also works for VF reset. This was done by modifying ice_vsi_init()
      to account for the current spoofchk state of the VF VSI.
      
      Because of these changes, Tx VLAN anti-spoof needs to be removed
      from ice_cfg_vlan_pruning(). This is okay for the VF because this
      is now controlled from the admin enabling/disabling spoofchk. For the
      PF, Tx VLAN anti-spoof should not be set. This change requires us to
      call ice_set_vf_spoofchk() when configuring promiscuous mode for
      the VF which requires ice_set_vf_spoofchk() to move in order to prevent
      a forward declaration prototype.
      
      Also, add VLAN 0 by default when allocating a VF since the PF is unaware
      if the guest OS is running the 8021q module. Without this, MDD events will
      trigger on untagged traffic because spoofcheck is enabled by default. Due
      to this change, ignore add/delete messages for VLAN 0 from VIRTCHNL since
      this is added/deleted during VF initialization/teardown respectively and
      should not be modified.
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      cd6d6b83
  3. 23 11月, 2019 8 次提交
  4. 09 11月, 2019 2 次提交
  5. 07 11月, 2019 3 次提交
  6. 05 11月, 2019 1 次提交
  7. 13 9月, 2019 1 次提交
    • T
      ice: Enable DDP package download · 462acf6a
      Tony Nguyen 提交于
      Attempt to request an optional device-specific DDP package file
      (one with the PCIe Device Serial Number in its name so that different DDP
      package files can be used on different devices). If the optional package
      file exists, download it to the device. If not, download the default
      package file.
      
      Log an appropriate message based on whether or not a DDP package
      file exists and the return code from the attempt to download it to the
      device.  If the download fails and there is not already a package file on
      the device, go into "Safe Mode" where some features are not supported.
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      462acf6a
  8. 05 9月, 2019 4 次提交
  9. 04 9月, 2019 2 次提交
  10. 27 8月, 2019 3 次提交
  11. 24 8月, 2019 4 次提交
  12. 21 8月, 2019 5 次提交