1. 15 4月, 2021 2 次提交
  2. 08 4月, 2021 1 次提交
  3. 25 9月, 2020 1 次提交
    • J
      ice: fix memory leak if register_netdev_fails · 135f4b9e
      Jacob Keller 提交于
      The ice_setup_pf_sw function can cause a memory leak if register_netdev
      fails, due to accidentally failing to free the VSI rings. Fix the memory
      leak by using ice_vsi_release, ensuring we actually go through the full
      teardown process.
      
      This should be safe even if the netdevice is not registered because we
      will have set the netdev pointer to NULL, ensuring ice_vsi_release won't
      call unregister_netdev.
      
      An alternative fix would be moving management of the PF VSI netdev into
      the main VSI setup code. This is complicated and likely requires
      significant refactor in how we manage VSIs
      
      Fixes: 3a858ba3 ("ice: Add support for VSI allocation and deallocation")
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      135f4b9e
  4. 24 7月, 2020 1 次提交
  5. 31 5月, 2020 1 次提交
  6. 23 5月, 2020 1 次提交
  7. 22 5月, 2020 1 次提交
  8. 11 3月, 2020 1 次提交
  9. 16 2月, 2020 2 次提交
    • B
      ice: Add support to enable/disable all Rx queues before waiting · 13a6233b
      Brett Creeley 提交于
      Currently when we enable/disable all Rx queues we do the following
      sequence for each Rx queue and then move to the next queue.
      
      1. Enable/Disable the Rx queue via register write.
      2. Read the configuration register to determine if the Rx queue was
      enabled/disabled successfully.
      
      In some cases enabling/disabling queue 0 fails because of step 2 above.
      Fix this by doing step 1 for all of the Rx queues and then step 2 for
      all of the Rx queues.
      
      Also, there are cases where we enable/disable a single queue (i.e.
      SR-IOV and XDP) so add a new function that does step 1 and 2 above with
      a read flush in between.
      
      This change also required a single Rx queue to be enabled/disabled with
      and without waiting for the change to propagate through hardware. Fix
      this by adding a boolean wait flag to the necessary functions.
      
      Also, add the keywords "one" and "all" to distinguish between
      enabling/disabling a single Rx queue and all Rx queues respectively.
      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>
      13a6233b
    • B
      ice: Add initial support for QinQ · 42f3efef
      Brett Creeley 提交于
      Allow support for S-Tag + C-Tag VLAN traffic by disabling pruning when
      there are no 0x8100 VLAN interfaces currently created on top of the PF.
      When an 0x8100 VLAN interface is configured, enable pruning and only
      support single and double C-Tag VLAN traffic. If all of the 0x8100
      interfaces that were created on top of the PF are removed via
      ethtool -K <iface> rx-vlan-filter off or via ip tools, then disable
      pruning and allow S-Tag + C-Tag traffic again.
      
      Add VLAN 0 filter by default for the PF. This is because a bridge
      sets the default_pvid to 1, sends the request down to
      ice_vlan_rx_add_vid(), and we never get the request to add VLAN 0 via
      the 8021q module which causes all untagged traffic to be dropped.
      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>
      42f3efef
  10. 13 2月, 2020 1 次提交
  11. 04 1月, 2020 1 次提交
    • B
      ice: Add code to keep track of current dflt_vsi · fc0f39bc
      Brett Creeley 提交于
      We can't have more than one default VSI so prevent another VSI from
      overwriting the current dflt_vsi. This was achieved by adding the
      following functions:
      
      ice_is_dflt_vsi_in_use()
      - Used to check if the default VSI is already being used.
      
      ice_is_vsi_dflt_vsi()
      - Used to check if VSI passed in is in fact the default VSI.
      
      ice_set_dflt_vsi()
      - Used to set the default VSI via a switch rule
      
      ice_clear_dflt_vsi()
      - Used to clear the default VSI via a switch rule.
      
      Also, there was no need to introduce any locking because all mailbox
      events and synchronization of switch filters for the PF happen in the
      service task.
      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>
      fc0f39bc
  12. 23 11月, 2019 1 次提交
  13. 09 11月, 2019 2 次提交
  14. 05 11月, 2019 3 次提交
  15. 13 9月, 2019 2 次提交
  16. 27 8月, 2019 2 次提交
  17. 24 8月, 2019 1 次提交
    • A
      ice: Fix issues updating VSI MAC filters · bbb968e8
      Akeem G Abodunrin 提交于
      VSI, especially VF could request to add or remove filter for another VSI,
      driver should really guide such request and disallow it.
      However, instead of returning error for such malicious request, driver
      can simply return success.
      
      In addition, we are not tracking number of MAC filters configured per
      VF correctly - and this leads to issue updating VF MAC filters whenever
      they were removed and re-configured via bringing VF interface down and
      up. Also, since VF could send request to update multiple MAC filters at
      once, driver should program those filters individually in the switch, in
      order to determine which action resulted to error, and communicate
      accordingly to the VF.
      
      So, with this changes, we now track number of filters added right from
      when VF resources allocation is done, and could properly add filters for
      both trusted and non_trusted VFs, without MAC filters mis-match issue in
      the switch...
      
      Also refactor code, so that driver can use new function to add or remove
      MAC filters.
      Signed-off-by: NAkeem G Abodunrin <akeem.g.abodunrin@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>
      bbb968e8
  18. 31 5月, 2019 1 次提交
  19. 30 5月, 2019 2 次提交
  20. 29 5月, 2019 1 次提交
  21. 02 5月, 2019 1 次提交
  22. 18 4月, 2019 1 次提交
    • A
      ice: Add code for DCB initialization part 3/4 · 7b9ffc76
      Anirudh Venkataramanan 提交于
      This patch adds a new function ice_pf_dcb_cfg (and related helpers)
      which applies the DCB configuration obtained from the firmware. As
      part of this, VSIs/netdevs are updated with traffic class information.
      
      This patch requires a bit of a refactor of existing code.
      
      1. For a MIB change event, the associated VSI is closed and brought up
         again. The gap between closing and opening the VSI can cause a race
         condition. Fix this by grabbing the rtnl_lock prior to closing the
         VSI and then only free it after re-opening the VSI during a MIB
         change event.
      
      2. ice_sched_query_elem is used in ice_sched.c and with this patch, in
         ice_dcb.c as well. However, ice_dcb.c is not built when CONFIG_DCB is
         unset. This results in namespace warnings (ice_sched.o: Externally
         defined symbols with no external references) when CONFIG_DCB is unset.
         To avoid this move ice_sched_query_elem from ice_sched.c to
         ice_common.c.
      Signed-off-by: NAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      7b9ffc76
  23. 27 3月, 2019 1 次提交
  24. 22 3月, 2019 1 次提交
  25. 16 1月, 2019 1 次提交
  26. 25 10月, 2018 1 次提交
  27. 03 10月, 2018 1 次提交
    • A
      ice: Add handler to configure SR-IOV · ddf30f7f
      Anirudh Venkataramanan 提交于
      This patch implements parts of ice_sriov_configure and VF reset flow.
      
      To create virtual functions (VFs), the user sets a value in num_vfs
      through sysfs. This results in the kernel calling the handler for
      .sriov_configure which is ice_sriov_configure.
      
      VF setup first starts with a VF reset, followed by allocation of the VF
      VSI using ice_vf_vsi_setup. Once the VF setup is complete a state bit
      ICE_VF_STATE_INIT is set in the vf->states bitmap to indicate that
      the VF is ready to go.
      
      Also for VF reset to go into effect, it's necessary to issue a disable
      queue command (ice_aqc_opc_dis_txqs). So this patch updates multiple
      functions in the disable queue flow to take additional parameters that
      distinguish if queues are being disabled due to VF reset.
      Signed-off-by: NAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ddf30f7f
  28. 02 10月, 2018 5 次提交