[Intel-wired-lan] [next PATCH S93 04/11] i40e: convert VEB TC stats to use an i40e_stats array
Bowers, AndrewX
andrewx.bowers at intel.com
Thu Aug 2 18:30:37 UTC 2018
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, July 31, 2018 3:42 AM
> To: Michael, Alice <alice.michael at intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S93 04/11] i40e: convert VEB TC stats
> to use an i40e_stats array
>
> From: Jacob Keller <jacob.e.keller at intel.com>
>
> 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: Jacob Keller <jacob.e.keller at intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 83 +++++++++++++---------
> ----
> 1 file changed, 43 insertions(+), 40 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan
mailing list