fm10k: add helper functions to set strings and data for ethtool stats
authorJacob Keller <[email protected]>
Fri, 5 Feb 2016 18:43:08 +0000 (10:43 -0800)
committerJeff Kirsher <[email protected]>
Tue, 5 Apr 2016 19:49:27 +0000 (12:49 -0700)
commitd2e0721b18f320232dc36a0e4cc7beb620e8c9bd
tree8ee21bdd3250277a092f1e789ef0dd1255bf4653
parentc8ed563bebeabbf0b1085b52916dd2fb6e219276
fm10k: add helper functions to set strings and data for ethtool stats

Reduce duplicate code and the amount of indentation by adding
fm10k_add_stat_strings and fm10k_add_ethtool_stats functions which help
add fm10k_stat structures to the ethtool stats callbacks. This helps
increase ease of use for future stat additions, and increases code
readability. Skip handling of the per-queue stats as these will be
reworked in a following patch.

Signed-off-by: Jacob Keller <[email protected]>
Tested-by: Krishneil Singh <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c