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
103ab8da
Commit
103ab8da
authored
Apr 27, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/wrsw_rtud: report hash/bucket of each entry for rtu_stat
parent
e203b814
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
0 deletions
+4
-0
rtu.h
userspace/wrsw_rtud/rtu.h
+1
-0
rtu_fd.c
userspace/wrsw_rtud/rtu_fd.c
+1
-0
rtud_exports.c
userspace/wrsw_rtud/rtud_exports.c
+1
-0
rtud_exports.h
userspace/wrsw_rtud/rtud_exports.h
+1
-0
No files found.
userspace/wrsw_rtud/rtu.h
View file @
103ab8da
...
...
@@ -137,6 +137,7 @@ struct filtering_entry {
// (2 words)
int
dynamic
;
uint16_t
hash
;
};
/**
...
...
userspace/wrsw_rtud/rtu_fd.c
View file @
103ab8da
...
...
@@ -198,6 +198,7 @@ int rtu_fd_create_entry(uint8_t mac[ETH_ALEN], uint16_t vid, uint32_t port_map,
hash
=
rtu_hash
(
mac
,
fid
);
// Check HTAB
ent
=
&
rtu_htab
[
hash
][
bucket
];
ent
->
hash
=
(
hash
<<
2
)
|
bucket
;
switch
(
htab_contains
(
mac
,
fid
,
&
bucket
,
&
ent
)){
case
FOUND
:
// update
...
...
userspace/wrsw_rtud/rtud_exports.c
View file @
103ab8da
...
...
@@ -65,6 +65,7 @@ int rtudexp_get_fd_list(const struct minipc_pd *pd,
list
->
list
[
i
].
spm
=
ent
->
port_mask_src
;
list
->
list
[
i
].
priority
=
0
;
list
->
list
[
i
].
dynamic
=
ent
->
dynamic
;
list
->
list
[
i
].
hash
=
ent
->
hash
;
}
list
->
num_rules
=
i
;
...
...
userspace/wrsw_rtud/rtud_exports.h
View file @
103ab8da
...
...
@@ -39,6 +39,7 @@ typedef struct
uint32_t
spm
;
uint8_t
priority
;
int
dynamic
;
uint16_t
hash
;
}
rtudexp_fd_entry_t
;
typedef
struct
{
...
...
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