Commit 93453e47 authored by Maciej Lipinski's avatar Maciej Lipinski Committed by Grzegorz Daniluk

wrsw_pstats: [to be removed from release] added new event (from TRU)

This commit is cherry-picked from v4-dev-rebased only for compatibility with
v4rc FPGA firmware. TRU event has to be removed both from gateware and software
for the final release.

Conflicts:

	userspace/tools/wrsw_pstats.c
parent 09a3c2be
......@@ -9,7 +9,7 @@
#define PSTATS_NPORTS 8 /* how many eth ports are in the switch */
#define PSTATS_CNT_PP 38 /* how many counters per port */
#define PSTATS_CNT_PP 39 /* how many counters per port */
#define PSTATS_ADR_PP ((PSTATS_CNT_PP+3)/4) /* how many address words are
* there per counter (each of
* them stores the state of 4
......
......@@ -23,7 +23,7 @@
_fpga_writel(FPGA_BASE_PSTATS + offsetof(struct PSTATS_WB, reg), val)
#define NPORTS 8
#define CNT_PP 38
#define CNT_PP 39
struct cnt_word {
uint32_t cnt; //4 cntrs per 32-bit word
......@@ -71,7 +71,8 @@ char info[][20] = {{"Tu-run|"}, // 0
{"RTUn-f|"}, // 34
{"RTUfst|"}, // 35
{"RTUful|"}, // 36
{"RTUfwd|"} // 37 ---
{"RTUfwd|"}, // 37 ---
{"TRUrsp|"} // 38
};
static void read_cntval(int port, int adr, uint32_t *data);
......@@ -194,7 +195,7 @@ int main(int argc, char **argv)
int option=0;
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 rtu_cnts[] = {29,30,31,32,33,34,35,36,37}; //9
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 op = 0;
......@@ -214,7 +215,7 @@ int main(int argc, char **argv)
print_chosen_cnts(ep_cnts, 29);
break;
case 'r':
print_chosen_cnts(rtu_cnts, 9);
print_chosen_cnts(rtu_cnts, 10);
break;
case 'a':
print_first_n_cnts(CNT_PP);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment