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
84
Issues
84
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
2e9542b1
Commit
2e9542b1
authored
Mar 09, 2012
by
Tomasz Wlostowski
Committed by
Alessandro Rubini
Mar 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/wrsw_rtud: re-done register layout for N-port generic RTU
parent
00ce398d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
316 additions
and
798 deletions
+316
-798
rtu.h
userspace/wrsw_rtud/rtu.h
+31
-34
rtu_drv.c
userspace/wrsw_rtud/rtu_drv.c
+158
-328
rtu_drv.h
userspace/wrsw_rtud/rtu_drv.h
+0
-5
rtu_fd.c
userspace/wrsw_rtud/rtu_fd.c
+70
-375
rtu_fd.h
userspace/wrsw_rtud/rtu_fd.h
+7
-7
rtu_hash.c
userspace/wrsw_rtud/rtu_hash.c
+16
-14
rtu_hash.h
userspace/wrsw_rtud/rtu_hash.h
+6
-6
rtud.c
userspace/wrsw_rtud/rtud.c
+28
-29
No files found.
userspace/wrsw_rtud/rtu.h
View file @
2e9542b1
...
...
@@ -39,16 +39,13 @@
#include "mac.h"
#define RTU_
BANKS 2
#define RTU_
ENTRIES 2048
#define RTU_BUCKETS 4
#define LAST_RTU_BUCKET ((RTU_BUCKETS)-1)
#define RTU_ENTRIES (16384/(RTU_BANKS))
#define HTAB_ENTRIES ((RTU_ENTRIES)/(RTU_BUCKETS))
#define LAST_HTAB_ENTRY ((HTAB_ENTRIES)-1)
#define LAST_RTU_BUCKET (RTU_BUCKETS-1)
#define ENTRY_WORDS 8
#define CAM_ENTRIES (((RTU_HCAM_WORDS)/(ENTRY_WORDS))/(RTU_BANKS))
#define LAST_CAM_ENTRY ((CAM_ENTRIES)-1)
#define MIN_PORT 0
#define MAX_PORT 9
...
...
userspace/wrsw_rtud/rtu_drv.c
View file @
2e9542b1
This diff is collapsed.
Click to expand it.
userspace/wrsw_rtud/rtu_drv.h
View file @
2e9542b1
...
...
@@ -33,11 +33,6 @@
#include "rtu.h"
// HW RTU (should be given by wrsw_rtu_wb.h)
#define RTU_HCAM 0x4000
#define RTU_ARAM_MAIN 0x8000
#define RTU_VLAN_TAB 0xc000
#define RTU_MFIFO_R0_DATA_SEL 0x00000000
#define RTU_MFIFO_R1_ADDR_MASK 0x0007FFFF
...
...
userspace/wrsw_rtud/rtu_fd.c
View file @
2e9542b1
This diff is collapsed.
Click to expand it.
userspace/wrsw_rtud/rtu_fd.h
View file @
2e9542b1
userspace/wrsw_rtud/rtu_hash.c
View file @
2e9542b1
...
...
@@ -28,6 +28,8 @@
*/
#include <hw/trace.h>
#include "rtu.h"
#include "rtu_hash.h"
...
...
@@ -53,7 +55,7 @@ uint16_t rtu_hash(uint8_t mac[ETH_ALEN], uint8_t fid)
hash
=
crc16
(
hash
,
((
uint16_t
)
mac
[
2
]
<<
8
)
|
mac
[
3
]);
hash
=
crc16
(
hash
,
((
uint16_t
)
mac
[
4
]
<<
8
)
|
mac
[
5
]);
return
hash
&
0x7FF
;
// trim to fit in ZBT SRAM addr
return
hash
&
(
HTAB_ENTRIES
-
1
);
/* warning: assumes that HTAB_ENTRIES is a power of 2 */
}
/*
...
...
userspace/wrsw_rtud/rtu_hash.h
View file @
2e9542b1
userspace/wrsw_rtud/rtud.c
View file @
2e9542b1
...
...
@@ -122,7 +122,7 @@ static void *rtu_daemon_wripc_process(void *arg)
{
while
(
1
){
rtud_handle_wripc
();
sleep
(
1
);
usleep
(
10000
);
}
return
NULL
;
}
...
...
@@ -195,7 +195,6 @@ static int rtu_daemon_init(uint16_t poly, unsigned long aging_time)
TRACE
(
TRACE_INFO
,
"init port config."
);
for
(
i
=
MIN_PORT
;
i
<=
MAX_PORT
;
i
++
)
{
// MIN_PORT <= port <= MAX_PORT, thus no err returned
fprintf
(
stderr
,
"**4**"
);
err
=
rtu_learn_enable_on_port
(
i
,
1
);
err
=
rtu_pass_all_on_port
(
i
,
1
);
...
...
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