Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Gateware
Commits
6935e96c
Commit
6935e96c
authored
May 10, 2019
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add port mirroring for NIC/CPU originated traffic
parent
b01a8ee9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
xwrsw_rtu_new.vhd
modules/wrsw_rtu/xwrsw_rtu_new.vhd
+23
-5
No files found.
modules/wrsw_rtu/xwrsw_rtu_new.vhd
View file @
6935e96c
...
...
@@ -118,6 +118,7 @@
library
ieee
;
use
ieee
.
std_logic_1164
.
all
;
use
ieee
.
std_logic_misc
.
all
;
use
ieee
.
math_real
.
CEIL
;
use
ieee
.
math_real
.
log2
;
use
ieee
.
numeric_std
.
all
;
...
...
@@ -276,6 +277,9 @@ architecture behavioral of xwrsw_rtu_new is
signal
htab_src_dst
:
std_logic
;
signal
dbg_forwarded_to_port
:
std_logic_vector
(
g_num_ports
-
1
downto
0
);
signal
aux_pmask_mirroring
:
std_logic_vector
(
c_RTU_MAX_PORTS
-1
downto
0
);
signal
mirror_port_dst
:
std_logic
;
signal
mirror_port_tx
:
std_logic
;
signal
CONTROL0
:
std_logic_vector
(
35
downto
0
);
signal
TRIG0
,
TRIG1
,
TRIG2
,
TRIG3
:
std_logic_vector
(
31
downto
0
);
...
...
@@ -871,13 +875,27 @@ begin
------------------------------------------------------------
-- Port mirroring handling for NIC/CPU-originated traffic --
------------------------------------------------------------
-- 1. If a given port is in dst mask, all NIC traffic to this port is
-- suppressed
-- 2. If a given port is in dsk mask, all NIC traffic originated from ports in
aux_rsp_ack_o
<=
rsp_ack_i
(
g_num_ports
);
rsp_o
(
g_num_ports
)
.
valid
<=
aux_rsp_i
.
valid
;
rsp_o
(
g_num_ports
)
.
prio
<=
aux_rsp_i
.
prio
;
rsp_o
(
g_num_ports
)
.
drop
<=
aux_rsp_i
.
drop
;
rsp_o
(
g_num_ports
)
.
hp
<=
aux_rsp_i
.
hp
;
-- port_mask includes at least one egress mirrored port
mirror_port_tx
<=
'1'
when
(
or_reduce
(
aux_rsp_i
.
port_mask
and
rtu_special_traffic_config
.
mirror_port_src_tx
)
/=
'0'
)
else
'0'
;
rsp_o
(
g_num_ports
)
.
port_mask
<=
aux_rsp_i
.
port_mask
when
(
rtu_special_traffic_config
.
mr_ena
=
'0'
)
else
aux_pmask_mirroring
;
-- 1. If mirrored port is in dst mask, all NIC traffic originated from ports in
-- egress mask goes also to this port.
-- 2. If a given port is in dst mask, all NIC traffic to this port is
-- suppressed
aux_pmask_mirroring
<=
aux_rsp_i
.
port_mask
or
rtu_special_traffic_config
.
mirror_port_dst
when
(
mirror_port_tx
=
'1'
)
else
aux_rsp_i
.
port_mask
and
(
not
rtu_special_traffic_config
.
mirror_port_dst
);
rsp_o
(
g_num_ports
)
<=
aux_rsp_i
;
aux_rsp_ack_o
<=
rsp_ack_i
(
g_num_ports
);
------------------------------------------------------------
-- CS_ICON : chipscope_icon
...
...
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