1. 26 10月, 2019 1 次提交
  2. 23 8月, 2019 1 次提交
  3. 06 8月, 2019 3 次提交
  4. 27 6月, 2019 1 次提交
  5. 15 6月, 2019 3 次提交
  6. 05 5月, 2019 2 次提交
  7. 04 5月, 2019 3 次提交
  8. 17 4月, 2019 2 次提交
  9. 27 3月, 2019 1 次提交
  10. 23 1月, 2019 1 次提交
  11. 22 1月, 2019 2 次提交
  12. 15 11月, 2018 3 次提交
  13. 08 11月, 2018 1 次提交
  14. 26 9月, 2018 1 次提交
  15. 09 9月, 2018 1 次提交
    • J
      i40e(vf): remove i40e_ethtool_stats.h header file · 6ad96bdc
      Jacob Keller 提交于
      Essentially reverts commit 8fd75c58 ("i40e: move ethtool
      stats boiler plate code to i40e_ethtool_stats.h", 2018-08-30), and
      additionally moves the similar code in i40evf into i40evf_ethtool.c.
      
      The code was intially moved from i40e_ethtool.c into i40e_ethtool_stats.h
      as a way of better logically organizing the code. This has two problems.
      First, we can't have an inline function with variadic arguments on all
      platforms. Second, it gave the appearance that we had plans to share
      code between the i40e and i40evf drivers, due to having a near copy of
      the contents in the i40evf/i40e_ethtool_stats.h file.
      
      Patches which actually attempt to combine or share code between the i40e
      and i40evf drivers have not materialized, and are likely a ways off.
      
      Rather than fixing the one function which causes build issues, just move
      this code back into the i40e_ethtool.c and i40evf_ethtool.c files. Note
      that we also change these functions back from static inlines to just
      statics, since they're no longer in a header file.
      
      We can revisit this if/when work is done to actually attempt to share
      code between drivers. Alternatively, this stats code could be made more
      generic so that it can be shared across drivers as part of ethtool
      kernel work.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ad96bdc
  16. 31 8月, 2018 2 次提交
  17. 24 8月, 2018 1 次提交
  18. 08 8月, 2018 3 次提交
  19. 07 8月, 2018 4 次提交
    • J
      i40e: convert priority flow control stats to use helpers · f25848d4
      Jacob Keller 提交于
      The priority flow control statistics are laid out in the stats structure
      using arrays. This made it unwieldy to use as part of an i40e_stats
      array.
      
      Add a new structure type, i40e_pfc_stats, and a helper function
      i40e_get_pfc_stats which can return the stats for a given priority
      value as an i40e_pfc_stats structure.
      
      Use this to create an i40e_stats array, which we'll use to format and
      copy the strings and stats into the supplied buffers.
      
      This reduces even more boiler plate code in i40e_get_ethtool_stats and
      i40e_get_stat_strings.
      
      An alternative would be to modify the structure definition for the pfc
      stats, but this is more invasive to the rest of the code base.
      
      Note that a macro was used to setup the copy of stats from the
      pf->stats, as this reduces the chance of typos in the code names. It
      will produce a checkpatch.pl warning due to re-use of a macro argument.
      In this case, it should be safe, as the macro will fail to compile in
      cases where the argument is not a simple structure member name, and thus
      arguments with side effects should not be an issue.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      f25848d4
    • J
      i40e: convert VEB TC stats to use an i40e_stats array · 1510ae0b
      Jacob Keller 提交于
      The VEB TC stats are currently implemented with separate parsing,
      instead of using the i40e_stats array and associated helper functions.
      This is likely because the stats rely on embedding the TC number into
      the stat name.
      
      Update i40e_add_stat_strings to take variadic arguments, and use these
      to vsnprintf the i40e_stats string as a string containing format
      specifiers.
      
      Create a stats array for the VEB TC related stats,
      i40e_gstrings_veb_tc_stats, and use this along with the helper functions
      to remove the specialized boiler plate code.
      
      Always call i40e_add_ethtool_stats for both this array and the general
      VEB stats array. This ensures that we zero out any memory in case it was
      not zero-allocated for us.
      
      This ultimately results in less boiler plate code for the
      i40e_get_stat_strings and i40e_get_ethtool_stats.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1510ae0b
    • J
      i40e: add helper to copy statistic values into ethtool buffer · f3030480
      Jacob Keller 提交于
      Similar to the helper function to copy the ethtool stats strings, add
      and use a helper function for copying the ethtool stats into the
      supplied buffer.
      
      Just like before, we use a macro to avoid having to pass ARRAY_SIZE
      manually, so as to reduce chance of bugs.
      
      Some of the stats, especially queue stats, are a bit trickier, and will
      be handled in future patches.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      f3030480
    • J
      i40e: add helper function for copying strings from stat arrays · 91f06544
      Jacob Keller 提交于
      Many of the ethtool statistics use the same basic logic for copying
      strings into the supplied buffer. A set of stats are stored in a const
      array of i40e_stats structures, and we apply these all together.
      
      Simplify the stats code by introducing a helper function which can take
      a stats array and copy the strings into the buffer, updating the buffer
      pointer as we go.
      
      We use a macro to implement i40e_add_stat_strings so that ARRAY_SIZE can
      be used on the array passed in. This ensures that we always use the
      matching size in __i40e_add_stat_strings.
      
      More complex stats currently do not use i40e_stats arrays, usually due
      to custom formatted strings, or because the stats are not laid out in
      the expected way. These stats will be updated to use the helper function
      in separate future patches.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      91f06544
  20. 22 5月, 2018 4 次提交