Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
99
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
8febd611
Commit
8febd611
authored
4 years ago
by
Michal Wasiak
Committed by
Adam Wujek
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
userspace/tools: add yes_no data type to wrs_dump_shmem
Signed-off-by:
Michal Wasiak
<
michal.wasiak@gmail.com
>
parent
a5c06f47
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/tools/wrs_dump_shmem.c
+22
-9
22 additions, 9 deletions
userspace/tools/wrs_dump_shmem.c
userspace/tools/wrs_dump_shmem.h
+1
-0
1 addition, 0 deletions
userspace/tools/wrs_dump_shmem.h
with
23 additions
and
9 deletions
userspace/tools/wrs_dump_shmem.c
+
22
−
9
View file @
8febd611
...
...
@@ -188,6 +188,19 @@ void dump_one_field(void *addr, struct dump_info *info, char *info_prefix)
case
dump_type_Integer16
:
printf
(
"%i
\n
"
,
*
(
short
*
)
p
);
break
;
case
dump_type_yes_no
:
i
=
*
(
uint8_t
*
)
p
;
switch
(
i
)
{
case
0
:
printf
(
"no(%d)
\n
"
,
i
);
break
;
case
1
:
printf
(
"yes(%d)
\n
"
,
i
);
break
;
default:
printf
(
"Unknown(%d)
\n
"
,
i
);
}
break
;
case
dump_type_time
:
printf
(
"%s
\n
"
,
timeToString
(
t
,
buf
));
...
...
@@ -449,8 +462,8 @@ struct dump_info hal_port_info [] = {
DUMP_FIELD
(
int
,
t24p_from_config
),
DUMP_FIELD
(
uint32_t
,
ep_base
),
DUMP_FIELD
(
int
,
sfpPresent
),
DUMP_FIELD
(
int
,
has_sfp_diag
),
DUMP_FIELD
(
int
,
monitor
),
DUMP_FIELD
(
yes_no
,
has_sfp_diag
),
DUMP_FIELD
(
yes_no
,
monitor
),
/* PPSi instance information */
DUMP_FIELD
(
int
,
portMode
),
...
...
@@ -569,9 +582,9 @@ int dump_hal_mem(struct wrs_shm_head *head)
struct
dump_info
htab_info
[]
=
{
DUMP_FIELD
(
int
,
addr
.
hash
),
DUMP_FIELD
(
int
,
addr
.
bucket
),
DUMP_FIELD
(
int
,
valid
),
DUMP_FIELD
(
yes_no
,
valid
),
DUMP_FIELD
(
int
,
end_of_bucket
),
DUMP_FIELD
(
int
,
is_bpdu
),
DUMP_FIELD
(
yes_no
,
is_bpdu
),
DUMP_FIELD_SIZE
(
bina
,
mac
,
ETH_ALEN
),
DUMP_FIELD
(
UInteger8
,
fid
),
DUMP_FIELD
(
uint32_t
,
port_mask_src
),
...
...
@@ -580,7 +593,7 @@ struct dump_info htab_info[] = {
DUMP_FIELD
(
int
,
drop_when_dest
),
DUMP_FIELD
(
int
,
drop_unmatched_src_ports
),
DUMP_FIELD
(
UInteger32
,
last_access_t
),
DUMP_FIELD
(
int
,
force_remove
),
DUMP_FIELD
(
yes_no
,
force_remove
),
DUMP_FIELD
(
UInteger8
,
prio_src
),
DUMP_FIELD
(
int
,
has_prio_src
),
DUMP_FIELD
(
int
,
prio_override_src
),
...
...
@@ -597,15 +610,15 @@ struct dump_info vlan_info[] = {
DUMP_FIELD
(
uint32_t
,
port_mask
),
DUMP_FIELD
(
UInteger8
,
fid
),
DUMP_FIELD
(
UInteger8
,
prio
),
DUMP_FIELD
(
int
,
has_prio
),
DUMP_FIELD
(
int
,
prio_override
),
DUMP_FIELD
(
int
,
drop
),
DUMP_FIELD
(
yes_no
,
has_prio
),
DUMP_FIELD
(
yes_no
,
prio_override
),
DUMP_FIELD
(
yes_no
,
drop
),
};
#undef DUMP_STRUCT
#define DUMP_STRUCT struct rtu_mirror_info
struct
dump_info
mirror_info
[]
=
{
DUMP_FIELD
(
int
,
en
),
DUMP_FIELD
(
yes_no
,
en
),
DUMP_FIELD
(
uint32_t
,
imask
),
DUMP_FIELD
(
uint32_t
,
emask
),
DUMP_FIELD
(
uint32_t
,
dmask
),
...
...
This diff is collapsed.
Click to expand it.
userspace/tools/wrs_dump_shmem.h
+
1
−
0
View file @
8febd611
...
...
@@ -45,6 +45,7 @@ enum dump_type {
dump_type_double
,
dump_type_float
,
dump_type_pointer
,
dump_type_yes_no
,
/* and strange ones, from IEEE */
dump_type_UInteger64
,
dump_type_Integer64
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment