1. 18 4月, 2019 2 次提交
  2. 27 3月, 2019 2 次提交
  3. 22 3月, 2019 2 次提交
  4. 20 3月, 2019 1 次提交
  5. 26 2月, 2019 1 次提交
  6. 16 1月, 2019 4 次提交
  7. 21 11月, 2018 2 次提交
  8. 14 11月, 2018 2 次提交
  9. 07 11月, 2018 3 次提交
  10. 03 10月, 2018 5 次提交
  11. 02 10月, 2018 3 次提交
    • B
      ice: Add support for dynamic interrupt moderation · 9e4ab4c2
      Brett Creeley 提交于
      Currently there is no support for dynamic interrupt moderation. This
      patch adds some initial code to support this. The following changes
      were made:
      
      1. Currently we are using multiple members to store the interrupt
         granularity (itr_gran_25/50/100/200). This is not necessary because
         we can query the device to determine what the interrupt granularity
         should be set to, done by a new function ice_get_itr_intrl_gran.
      
      2. Added intrl to ice_q_vector structure to support interrupt rate
         limiting.
      
      3. Added the function ice_intrl_usecs_to_reg for converting to a value
         in usecs that the device understands.
      
      4. Added call to write to the GLINT_RATE register. Disable intrl by
         default for now.
      
      5. Changed rx/tx_itr_setting to itr_setting because having both seems
         redundant because a ring is either Tx or Rx.
      
      6. Initialize itr_setting for both Tx/Rx rings in ice_vsi_alloc_rings()
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      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>
      9e4ab4c2
    • P
      ice: Split irq_tracker into sw_irq_tracker and hw_irq_tracker · eb0208ec
      Preethi Banala 提交于
      For the PF driver, when mapping interrupts to queues, we need to request
      IRQs from the kernel and we also have to allocate interrupts from
      the device.
      
      Similarly, when the VF driver (iavf.ko) initializes, it requests the kernel
      IRQs that it needs but it can't directly allocate interrupts in the device.
      Instead, it sends a mailbox message to the ice driver, which then allocates
      interrupts in the device on the VF driver's behalf.
      
      Currently both these cases end up having to reserve entries in
      pf->irq_tracker but irq_tracker itself is sized based on how many vectors
      the PF driver needs. Under the right circumstances, the VF driver can fail
      to get entries in irq_tracker, which will result in the VF driver failing
      probe.
      
      To fix this, sw_irq_tracker and hw_irq_tracker are introduced. The
      sw_irq_tracker tracks only the PF's IRQ request and doesn't play any
      role in VF init. hw_irq_tracker represents the device's interrupt space.
      When interrupts have to be allocated in the device for either PF or VF,
      hw_irq_tracker will be looked up to see if the device has run out of
      interrupts.
      Signed-off-by: NPreethi Banala <preethi.banala@intel.com>
      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>
      eb0208ec
    • D
      ice: Change pf state behavior to protect reset path · 5df7e45d
      Dave Ertman 提交于
      Currently, there is no bit, or set of bits, that protect the entirety
      of the reset path.
      
      If the reset is originated by the driver, then the relevant
      one of the following bits will be set when the reset is scheduled:
      __ICE_PFR_REQ
      __ICE_CORER_REQ
      __ICE_GLOBR_REQ
      This bit will not be cleared until after the rebuild has completed.
      
      If the reset is originated by the FW, then the first the driver knows of
      it will be the reception of the OICR interrupt.  The __ICE_RESET_OICR_RECV
      bit will be set in the interrupt handler.  This will also be the indicator
      in a SW originated reset that we have completed the pre-OICR tasks and
      have informed the FW that a reset was requested.
      
      To utilize these bits, change the function:
      ice_is_reset_recovery_pending()
      	to be:
      ice_is_reset_in_progress()
      
      The new function will check all of the above bits in the pf->state and
      will return a true if one or more of these bits are set.
      Signed-off-by: NDave Ertman <david.m.ertman@intel.com>
      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>
      5df7e45d
  12. 29 9月, 2018 1 次提交
  13. 27 9月, 2018 1 次提交
  14. 29 8月, 2018 3 次提交
  15. 24 8月, 2018 2 次提交
    • B
      ice: Change struct members from bool to u8 · 43f8b224
      Bruce Allan 提交于
      Recent versions of checkpatch have a new warning based on a documented
      preference of Linus to not use bool in structures due to wasted space and
      the size of bool is implementation dependent.  For more information, see
      the email thread at https://lkml.org/lkml/2017/11/21/384.
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: NAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Tested-by: NTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      43f8b224
    • J
      ice: Report stats for allocated queues via ethtool stats · f8ba7db8
      Jacob Keller 提交于
      It is not safe to have the string table for statistics change order or
      size over the lifetime of a given netdevice. This is because of the
      nature of the 3-step process for obtaining stats. First, user space
      performs a request for the size of the strings table. Second it performs
      a separate request for the strings themselves, after allocating space
      for the table. Third, it requests the stats themselves, also allocating
      space for the table.
      
      If the size decreased, there is potential to see garbage data or stats
      values. In the worst case, we could potentially see stats values become
      mis-aligned with their strings, so that it looks like a statistic is
      being reported differently than it actually is.
      
      Even worse, if the size increased, there is potential that the strings
      table or stats table was not allocated large enough and the stats code
      could access and write to memory it should not, potentially resulting in
      undefined behavior and system crashes.
      
      It isn't even safe if the size always changes under the RTNL lock. This
      is because the calls take place over multiple user space commands, so it
      is not possible to hold the RTNL lock for the entire duration of
      obtaining strings and stats. Further, not all consumers of the ethtool
      API are the user space ethtool program, and it is possible that one
      assumes the strings will not change (valid under the current contract),
      and thus only requests the stats values when requesting stats in a loop.
      
      Finally, it's not possible in the general case to detect when the size
      changes, because it is quite possible that one value which could impact
      the stat size increased, while another decreased. This would result in
      the same total number of stats, but reordering them so that stats no
      longer line up with the strings they belong to. Since only size changes
      aren't enough, we would need some sort of hash or token to determine
      when the strings no longer match. This would require extending the
      ethtool stats commands, but there is no more space in the relevant
      structures.
      
      The real solution to resolve this would be to add a completely new API
      for stats, probably over netlink.
      
      In the ice driver, the only thing impacting the stats that is not
      constant is the number of queues. Instead of reporting stats for each
      used queue, report stats for each allocated queue. We do not change the
      number of queues allocated for a given netdevice, as we pass this into
      the alloc_etherdev_mq() function to set the num_tx_queues and
      num_rx_queues.
      
      This resolves the potential bugs at the slight cost of displaying many
      queue statistics which will not be activated.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
      Tested-by: NTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      f8ba7db8
  16. 27 3月, 2018 6 次提交