]> git.baikalelectronics.ru Git - kernel.git/commit
fm10k: add helper functions to set strings and data for ethtool stats
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 5 Feb 2016 18:43:08 +0000 (10:43 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 5 Apr 2016 19:49:27 +0000 (12:49 -0700)
commit503200af78e603d9bc7d0ba0e3edcbe36c5ffa8e
tree8ee21bdd3250277a092f1e789ef0dd1255bf4653
parent8b7f7f7f1e96a25228759948b9323358d092cf0e
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 <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c