Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
950856e1
Commit
950856e1
authored
Jul 14, 2016
by
Grzegorz Daniluk
Committed by
Adam Wujek
Jul 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pstats: adding support for NIC TX Frames counter
parent
8fa85648
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
43 deletions
+45
-43
wr_pstats.c
kernel/wr_pstats/wr_pstats.c
+2
-1
wr_pstats.h
kernel/wr_pstats/wr_pstats.h
+1
-1
wrs_pstats.c
userspace/tools/wrs_pstats.c
+42
-41
No files found.
kernel/wr_pstats/wr_pstats.c
View file @
950856e1
...
...
@@ -100,7 +100,8 @@ static struct pstats_version_description pstats_desc[] = {
"FastMatch: Resp Valid
\n
"
/* 35 */
"FullMatch: Resp Valid
\n
"
/* 36 */
"Forwarded
\n
"
/* 37 */
"TRU Resp Valid"
,
/* 38 */
"TRU Resp Valid
\n
"
/* 38 */
"NIC TX Frames"
,
/* 39 */
.
rx_packets
=
19
,
/* RX Frames */
.
tx_packets
=
18
,
/* TX Frames */
.
rx_errors
=
6
,
/* RX PCS Errors */
...
...
kernel/wr_pstats/wr_pstats.h
View file @
950856e1
...
...
@@ -7,7 +7,7 @@
#define WRVIC_BASE_IRQ (NR_AIC_IRQS + (5 * 32))
/*****/
#define PSTATS_MAX_NUM_OF_COUNTERS
39
/* Maximum number of counters
#define PSTATS_MAX_NUM_OF_COUNTERS
40
/* Maximum number of counters
* supported by the driver */
#define PSTATS_MAX_NPORTS 18
/* Maximum number of ports
...
...
userspace/tools/wrs_pstats.c
View file @
950856e1
...
...
@@ -18,7 +18,7 @@
static
void
parse_sysfs
(
void
);
#define NPORTS 18
#define CNT_PP
39
#define CNT_PP
40
struct
cnt_word
{
uint64_t
cnt
;
...
...
@@ -35,44 +35,45 @@ struct p_cnt cnt_pp[NPORTS];
int
use_ports
;
char
info
[][
20
]
=
{{
"Tu-run|"
},
// 0
{
"Ro-run|"
},
// 1
{
"Riv-cd|"
},
// 2
{
"Rsyn-l|"
},
// 3
{
"Rpause|"
},
// 4
{
"Rpf-dp|"
},
// 5
{
"Rpcs-e|"
},
// 6
{
"Rgiant|"
},
// 7
{
"Rrunt |"
},
// 8
{
"Rcrc_e|"
},
// 9
{
"Rpcl_0|"
},
// 10
{
"Rpcl_1|"
},
// 11
{
"Rpcl_2|"
},
// 12
{
"Rpcl_3|"
},
// 13
{
"Rpcl_4|"
},
// 14
{
"Rpcl_5|"
},
// 15
{
"Rpcl_6|"
},
// 16
{
"Rpcl_7|"
},
// 17
{
"Tframe|"
},
// 18
{
"Rframe|"
},
// 19
{
"Rrtu_f|"
},
// 20
{
"Rpri_0|"
},
// 21 -> p0
{
"Rpri_1|"
},
// 22 -> p1
{
"Rpri_2|"
},
// 23 -> p2
{
"Rpri_3|"
},
// 24 -> p3
{
"Rpri_4|"
},
// 25 -> p4
{
"Rpri_5|"
},
// 26 -> p5
{
"Rpri_6|"
},
// 27 -> p6
{
"Rpri_7|"
},
// 28 -> p7
{
"RTUreq|"
},
// 29
{
"RTUrsp|"
},
// 30
{
"RTUdrp|"
},
// 31
{
"RTUhp |"
},
// 32
{
"RTUf-f|"
},
// 33
{
"RTUn-f|"
},
// 34
{
"RTUfst|"
},
// 35
{
"RTUful|"
},
// 36
{
"RTUfwd|"
},
// 37 ---
{
"TRUrsp|"
}
// 38
{
"Ro-run|"
},
// 1
{
"Riv-cd|"
},
// 2
{
"Rsyn-l|"
},
// 3
{
"Rpause|"
},
// 4
{
"Rpf-dp|"
},
// 5
{
"Rpcs-e|"
},
// 6
{
"Rgiant|"
},
// 7
{
"Rrunt |"
},
// 8
{
"Rcrc_e|"
},
// 9
{
"Rpcl_0|"
},
// 10
{
"Rpcl_1|"
},
// 11
{
"Rpcl_2|"
},
// 12
{
"Rpcl_3|"
},
// 13
{
"Rpcl_4|"
},
// 14
{
"Rpcl_5|"
},
// 15
{
"Rpcl_6|"
},
// 16
{
"Rpcl_7|"
},
// 17
{
"Tframe|"
},
// 18
{
"Rframe|"
},
// 19
{
"Rrtu_f|"
},
// 20
{
"Rpri_0|"
},
// 21 -> p0
{
"Rpri_1|"
},
// 22 -> p1
{
"Rpri_2|"
},
// 23 -> p2
{
"Rpri_3|"
},
// 24 -> p3
{
"Rpri_4|"
},
// 25 -> p4
{
"Rpri_5|"
},
// 26 -> p5
{
"Rpri_6|"
},
// 27 -> p6
{
"Rpri_7|"
},
// 28 -> p7
{
"RTUreq|"
},
// 29
{
"RTUrsp|"
},
// 30
{
"RTUdrp|"
},
// 31
{
"RTUhp |"
},
// 32
{
"RTUf-f|"
},
// 33
{
"RTUn-f|"
},
// 34
{
"RTUfst|"
},
// 35
{
"RTUful|"
},
// 36
{
"RTUfwd|"
},
// 37 ---
{
"TRUrsp|"
},
// 38
{
"NIC_Tx|"
}
// 39
};
int
pstats_init
(
int
init
)
...
...
@@ -206,7 +207,7 @@ void print_info(char *prgname)
int
main
(
int
argc
,
char
**
argv
)
{
int
prio_cnts
[]
=
{
21
,
22
,
23
,
24
,
25
,
26
,
27
,
28
};
//8
int
def_cnts
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
29
,
30
,
31
,
32
,
33
,
34
,
35
,
36
,
37
};
//30
int
def_cnts
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
29
,
30
,
31
,
32
,
33
,
34
,
35
,
36
,
37
,
39
};
//31
int
rtu_cnts
[]
=
{
29
,
30
,
31
,
32
,
33
,
34
,
35
,
36
,
37
,
38
};
//10
int
ep_cnts
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
,
28
};
//29
int
traffic
[]
=
{
18
,
19
};
//2
...
...
@@ -260,7 +261,7 @@ int main(int argc, char **argv)
print_first_n_cnts
(
CNT_PP
);
break
;
default:
print_chosen_cnts
(
def_cnts
,
3
0
);
print_chosen_cnts
(
def_cnts
,
3
1
);
}
sleep
(
1
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment