aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTariq Toukan2016-03-02 00:13:35 +0200
committerDavid S. Miller2016-03-01 17:27:59 -0500
commitc89fb18b657b07d6c98810182057f844e71d3eee (patch)
tree2fdb7e30a56a9cb7b4ec92aa30a1542869cf3d69
parent3b6195240c52b38a2d7ecc9cc8407596d9f24663 (diff)
net/mlx5e: Move common case counters within sq_stats struct
For data cache locality considerations, we moved the nop and csum_offload_inner within sq_stats struct as they are more commonly accessed in xmit path. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index 451198444ace..b289660568cf 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -260,26 +260,28 @@ static const char sq_stats_strings[][ETH_GSTRING_LEN] = {
"tso_bytes",
"tso_inner_packets",
"tso_inner_bytes",
- "csum_offload_none",
"csum_offload_inner",
+ "nop",
+ "csum_offload_none",
"stopped",
"wake",
"dropped",
- "nop"
};
struct mlx5e_sq_stats {
+ /* commonly accessed in data path */
u64 packets;
u64 tso_packets;
u64 tso_bytes;
u64 tso_inner_packets;
u64 tso_inner_bytes;
- u64 csum_offload_none;
u64 csum_offload_inner;
+ u64 nop;
+ /* less likely accessed in data path */
+ u64 csum_offload_none;
u64 stopped;
u64 wake;
u64 dropped;
- u64 nop;
#define NUM_SQ_STATS 11
};