-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mlx4_en: Create new header file for all statistics info
Add mlx4_stats.h file and move there all statistics structs and marcos. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Eran Ben Elisha
authored and
David S. Miller
committed
Mar 31, 2015
1 parent
66f24a7
commit b4b6e84
Showing
4 changed files
with
49 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#ifndef _MLX4_STATS_ | ||
#define _MLX4_STATS_ | ||
|
||
#ifdef MLX4_EN_PERF_STAT | ||
#define NUM_PERF_STATS NUM_PERF_COUNTERS | ||
#else | ||
#define NUM_PERF_STATS 0 | ||
#endif | ||
|
||
#define NUM_PRIORITIES 9 | ||
#define NUM_PRIORITY_STATS 2 | ||
|
||
struct mlx4_en_pkt_stats { | ||
unsigned long broadcast; | ||
unsigned long rx_prio[8]; | ||
unsigned long tx_prio[8]; | ||
#define NUM_PKT_STATS 17 | ||
}; | ||
|
||
struct mlx4_en_port_stats { | ||
unsigned long tso_packets; | ||
unsigned long xmit_more; | ||
unsigned long queue_stopped; | ||
unsigned long wake_queue; | ||
unsigned long tx_timeout; | ||
unsigned long rx_alloc_failed; | ||
unsigned long rx_chksum_good; | ||
unsigned long rx_chksum_none; | ||
unsigned long rx_chksum_complete; | ||
unsigned long tx_chksum_offload; | ||
#define NUM_PORT_STATS 10 | ||
}; | ||
|
||
struct mlx4_en_perf_stats { | ||
u32 tx_poll; | ||
u64 tx_pktsz_avg; | ||
u32 inflight_avg; | ||
u16 tx_coal_avg; | ||
u16 rx_coal_avg; | ||
u32 napi_quota; | ||
#define NUM_PERF_COUNTERS 6 | ||
}; | ||
|
||
#define NUM_MAIN_STATS 21 | ||
#define NUM_ALL_STATS (NUM_MAIN_STATS + NUM_PORT_STATS + NUM_PKT_STATS + \ | ||
NUM_PERF_STATS) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters