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
85
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
82f4d97f
Commit
82f4d97f
authored
4 years ago
by
Michal Wasiak
Committed by
Adam Wujek
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
snmp/bridge_mib: update dot1qFdbTable (count htab not vlans)
Signed-off-by:
Michal Wasiak
<
michal.wasiak@gmail.com
>
parent
0fab728d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
userspace/snmpd/bridge_mib/dot1qFdbTable/dot1qFdbTable_data_access.c
+14
-14
14 additions, 14 deletions
...nmpd/bridge_mib/dot1qFdbTable/dot1qFdbTable_data_access.c
with
14 additions
and
14 deletions
userspace/snmpd/bridge_mib/dot1qFdbTable/dot1qFdbTable_data_access.c
+
14
−
14
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_h
tab_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
...
...
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