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
82f4d97f
Commit
82f4d97f
authored
Oct 14, 2020
by
Michal Wasiak
Committed by
Adam Wujek
Oct 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snmp/bridge_mib: update dot1qFdbTable (count htab not vlans)
Signed-off-by:
Michal Wasiak
<
michal.wasiak@gmail.com
>
parent
0fab728d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
dot1qFdbTable_data_access.c
...nmpd/bridge_mib/dot1qFdbTable/dot1qFdbTable_data_access.c
+14
-14
No files found.
userspace/snmpd/bridge_mib/dot1qFdbTable/dot1qFdbTable_data_access.c
View file @
82f4d97f
...
...
@@ -217,31 +217,31 @@ dot1qFdbTable_container_load(netsnmp_container *container)
*/
u_long
dot1qFdbId
=
0
;
struct
rtu_
vlan_table_entry
vlan_tab_local
[
NUM_VLAN
S
];
int
vlans_in_fids_counters
[
NUM_VLANS
];
struct
rtu_
filtering_entry
rtu_htab_local
[
RTU_BUCKETS
*
HTAB_ENTRIE
S
];
int
entries_per_fid_table
[
NUM_VLANS
];
u_long
i
;
int
read_entries
;
DEBUGMSGTL
((
"verbose:dot1qFdbTable:dot1qFdbTable_container_load"
,
"called
\n
"
));
if
(
0
!=
shmem_rtu_read_vlans
(
vlan_tab_local
))
{
memset
(
entries_per_fid_table
,
0
,
sizeof
(
entries_per_fid_table
)
*
sizeof
(
int
));
if
(
0
!=
shmem_rtu_read_htab
(
rtu_htab_local
,
&
read_entries
))
{
return
MFD_RESOURCE_UNAVAILABLE
;
}
memset
(
vlans_in_fids_counters
,
0
,
NUM_VLANS
*
sizeof
(
int
));
/* Count number of vlans per fid */
for
(
i
=
0
;
i
<
NUM_VLANS
;
i
++
)
{
/* skip empty entires */
if
((
vlan_tab_local
[
i
].
drop
!=
0
)
&&
(
vlan_tab_local
[
i
].
port_mask
==
0x0
))
continue
;
vlans_in_fids_counters
[
vlan_tab_local
[
i
].
fid
]
++
;
/* Count number of entries per fid */
for
(
i
=
0
;
i
<
read_entries
;
i
++
)
{
if
(
rtu_htab_local
[
i
].
dynamic
!=
RTU_ENTRY_TYPE_DYNAMIC
)
{
/* count only dynamic entries */
continue
;
}
entries_per_fid_table
[
rtu_htab_local
[
i
].
fid
]
++
;
}
for
(
dot1qFdbId
=
0
;
dot1qFdbId
<
NUM_VLANS
;
dot1qFdbId
++
)
{
if
(
vlans_in_fids_counters
[
dot1qFdbId
]
==
0
)
{
if
(
entries_per_fid_table
[
dot1qFdbId
]
==
0
)
{
/* Skip fids with no vlans */
continue
;
}
...
...
@@ -267,7 +267,7 @@ dot1qFdbTable_container_load(netsnmp_container *container)
* setup/save data for dot1qFdbDynamicCount
* dot1qFdbDynamicCount(2)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
*/
rowreq_ctx
->
data
.
dot1qFdbDynamicCount
=
vlans_in_fids_counters
[
dot1qFdbId
];
rowreq_ctx
->
data
.
dot1qFdbDynamicCount
=
entries_per_fid_table
[
dot1qFdbId
];
/*
* insert into table container
...
...
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