aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stat-cpi.py
diff options
context:
space:
mode:
authorJacob Keller <[email protected]>2018-08-20 08:12:23 -0700
committerJeff Kirsher <[email protected]>2018-08-30 13:53:03 -0700
commit4b59938b209efedc4277e99be0ec7ddbc66fed10 (patch)
tree04d0a105031c006e65d0b30b73f1239f64c73c91 /tools/perf/scripts/python/stat-cpi.py
parentf0259b6ac4a3d27f6b7e938d6fce367cea377063 (diff)
i40e: convert queue stats to i40e_stats array
Use an i40e_stats array to handle the queue stats, instead of coding similar functionality separately. Because of how the queue stats are accessed on some kernels, we can't easily use i40e_add_ethtool_stats. Instead, implement a separate helper, i40e_add_queue_stats, which we'll use instead. This helper will correctly implement the u64_stats_fetch_begin_irq logic and allow retries until successful. We share the most complex code by re-using i40e_add_one_ethtool_stat. This logic additionally easily supports skipping disabled rings by using a ternary operator before calling the u64_stats_fetch_begin_irq() function, so that we correctly zero-out the stats values without having to perform two separate sections of code. This significantly reduces the boiler plate code in i40e_get_ethtool_stats, and helps keep the complex logic contained to as few functions as possible. With this patch, we've finally converted all the statistics to use the helpers and the i40e_stats function. Signed-off-by: Jacob Keller <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions