1. 24 7月, 2020 3 次提交
    • J
      ice: split ice_discover_caps into two functions · 81aed647
      Jacob Keller 提交于
      Using the new ice_aq_list_caps and ice_parse_(dev|func)_caps functions,
      replace ice_discover_caps with two functions that each take a pointer to
      the dev_caps and func_caps structures respectively.
      
      This makes the side effect of updating the hw->dev_caps and
      hw->func_caps obvious from reading the implementation of the function.
      Additionally, it opens the way for enabling reading of device
      capabilities outside of the initialization flow. By passing in
      a pointer, another caller will be able to read the capabilities without
      modifying the HW capabilities structures.
      
      As there are no other callers, it is safe to now remove
      ice_aq_discover_caps and ice_parse_caps.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      81aed647
    • J
      ice: split ice_parse_caps into separate functions · 595b13e2
      Jacob Keller 提交于
      The ice_parse_caps function is used to convert the capability block data
      coming from firmware into a structured format used by other parts of the
      code.
      
      The current implementation directly updates the hw->func_caps and
      hw->dev_caps structures. It is directly called from within
      ice_aq_discover_caps. This causes the discover_caps function to have the
      side effect of modifying the HW capability structures, which is not
      intuitive.
      
      Split this function into ice_parse_dev_caps and ice_parse_func_caps.
      These functions will take a pointer to the dev_caps and func_caps
      respectively. Also create an ice_parse_common_caps for sharing the
      capability logic that is common to device and function.
      
      Doing so enables a future refactor to allow reading and parsing
      capabilities into a local caps structure instead of modifying the
      members of the HW structure directly.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      595b13e2
    • J
      ice: refactor ice_discover_caps to avoid need to retry · 1082b360
      Jacob Keller 提交于
      The ice_discover_caps function is used to read the device and function
      capabilities, updating the hardware capabilities structures with
      relevant data.
      
      The exact number of capabilities returned by the hardware is unknown
      ahead of time. The AdminQ command will report the total number of
      capabilities in the return buffer.
      
      The current implementation involves requesting capabilities once,
      reading this returned size, and then re-requested with that size.
      
      This isn't really necessary. The firmware interface has a maximum size
      of ICE_AQ_MAX_BUF_LEN. Firmware can never return more than
      ICE_AQ_MAX_BUF_LEN / sizeof(struct ice_aqc_list_caps_elem) capabilities.
      
      Avoid the retry loop by simply allocating a buffer of size
      ICE_AQ_MAX_BUF_LEN. This is significantly simpler than retrying. The
      extra allocation isn't a big deal, as it will be released after we
      finish parsing the capabilities.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      1082b360
  2. 10 7月, 2020 1 次提交
  3. 02 7月, 2020 3 次提交
  4. 26 6月, 2020 1 次提交
    • J
      net/intel: remove driver versions from Intel drivers · 34a2a3b8
      Jeff Kirsher 提交于
      As with other networking drivers, remove the unnecessary driver version
      from the Intel drivers. The ethtool driver information and module version
      will then report the kernel version instead.
      
      For ixgbe, i40e and ice drivers, the driver passes the driver version to
      the firmware to confirm that we are up and running.  So we now pass the
      value of UTS_RELEASE to the firmware.  This adminq call is required per
      the HAS document.  The Device then sends an indication to the BMC that the
      PF driver is present. This is done using Host NC Driver Status Indication
      in NC-SI Get Link command or via the Host Network Controller Driver Status
      Change AEN.
      
      What the BMC may do with this information is implementation-dependent, but
      this is a standard NC-SI 1.1 command we honor per the HAS.
      
      CC: Bruce Allan <bruce.w.allan@intel.com>
      CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
      CC: Alek Loktionov <aleksandr.loktionov@intel.com>
      CC: Kevin Liedtke <kevin.d.liedtke@intel.com>
      CC: Aaron Rowden <aaron.f.rowden@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Co-developed-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      34a2a3b8
  5. 19 6月, 2020 1 次提交
  6. 02 6月, 2020 1 次提交
  7. 31 5月, 2020 14 次提交
  8. 29 5月, 2020 15 次提交
  9. 28 5月, 2020 1 次提交
    • K
      ice: Check UMEM FQ size when allocating bufs · 3f0d97cd
      Krzysztof Kazimierczak 提交于
      If a UMEM is present on a queue when an interface/queue pair is being
      enabled, the driver will try to prepare the Rx buffers in advance to
      improve performance. However, if fill queue is shorter than HW Rx ring,
      the driver will report failure after getting the last address from the
      fill queue.
      
      This still lets the driver process the packets correctly during the NAPI
      poll, but leads to a constant NAPI rescheduling. Not allocating the
      buffers in advance would result in a potential performance decrease.
      
      Commit d57d7642 ("xsk: Add API to check for available entries in FQ")
      provides an API that lets drivers check the number of addresses that the
      fill queue holds.
      
      Notify the user if fill queue is not long enough to prepare all buffers
      before packet processing starts, and allocate the buffers during the
      NAPI poll. If the fill queue size is sufficient, prepare Rx buffers in
      advance.
      Signed-off-by: NKrzysztof Kazimierczak <krzysztof.kazimierczak@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3f0d97cd