summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
diff options
context:
space:
mode:
authorNogah Frankel2017-10-26 10:55:32 +0200
committerDavid S. Miller2017-10-27 16:25:55 +0200
commit9deef43ddfb1dfa5f42e4066610cfe606212b0a1 (patch)
tree5aff4f8e62a06d857fe586f8398d17a30de46559 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h
parentbpf: remove tail_call and get_stackid helper declarations from bpf.h (diff)
downloadkernel-qcow2-linux-9deef43ddfb1dfa5f42e4066610cfe606212b0a1.tar.gz
kernel-qcow2-linux-9deef43ddfb1dfa5f42e4066610cfe606212b0a1.tar.xz
kernel-qcow2-linux-9deef43ddfb1dfa5f42e4066610cfe606212b0a1.zip
mlxsw: spectrum: Change stats cache to be local
Change the HW stats cache to be local. Rename it for better clarity. It holds the results of the last result of HW stats that are being read periodically, in order to have answer for stats request immediately. Signed-off-by: Nogah Frankel <nogahf@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index dc1b739c3ae1..aa0cefb25e18 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -231,9 +231,9 @@ struct mlxsw_sp_port {
struct list_head mall_tc_list;
struct {
#define MLXSW_HW_STATS_UPDATE_TIME HZ
- struct rtnl_link_stats64 *cache;
+ struct rtnl_link_stats64 stats;
struct delayed_work update_dw;
- } hw_stats;
+ } periodic_hw_stats;
struct mlxsw_sp_port_sample *sample;
struct list_head vlans_list;
};