Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mirrororch] Port Mirroring implementation #1314

Merged
merged 9 commits into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 69 additions & 1 deletion doc/swss-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,10 @@ Stores information about mirror sessions and their properties.
ttl = h8 ; Session TTL
queue = h8 ; Session output queue
policer = policer_name ; Session policer name
dst_port = PORT_TABLE|ifname ; Session destination PORT
src_port = PORT_TABLE|ifname ; Session source PORT/LAG list
direction = "RX"/"TX"/"BOTH" ; Session direction
type = "SPAN"/"ERSPAN" ; Session type. Default is ERSPAN
daall marked this conversation as resolved.
Show resolved Hide resolved

;value annotations
mirror_session_name = 1*255VCHAR
Expand Down Expand Up @@ -623,6 +627,37 @@ Example:
}
]

[
{
"MIRROR_SESSION_TABLE:session_2": {
"src_ip": "1.1.1.1",
"dst_ip": "2.2.2.2",
"gre_type": "0x6558",
"dscp": "50",
"ttl": "64",
"queue": "0"
"src_port": "Ethernet0,PortChannel001"
"direction": "BOTH"
"type": "ERSPAN"
},
"OP": "SET"
}
]

[
{
"MIRROR_SESSION_TABLE:session_3": {
"type": "SPAN"
"dst_port": "Ethernet0"
"src_port": "Ethernet4,PortChannel002"
"direction": "BOTH"
},
"OP": "SET"
}
]



Equivalent RedisDB entry:

127.0.0.1:6379> KEYS *MIRROR*
Expand All @@ -631,7 +666,7 @@ Equivalent RedisDB entry:
1) "src_ip"
2) "1.1.1.1"
3) "dst_ip"
4) "2.2.2.2
4) "2.2.2.2"
5) "gre_type"
6) "0x6558"
7) "dscp"
Expand All @@ -641,6 +676,39 @@ Equivalent RedisDB entry:
11) "queue"
12) "0"

127.0.0.1:6379> KEYS *MIRROR*
1) "MIRROR_SESSION_TABLE:session_2"
127.0.0.1:6379> HGETALL MIRROR_SESSION_TABLE:session_2
1) "src_ip"
2) "1.1.1.1"
3) "dst_ip"
4) "2.2.2.2"
5) "gre_type"
6) "0x6558"
7) "dscp"
8) "50"
9) "ttl"
10) "64"
11) "queue"
12) "0"
13) "src_port"
14) "Ethernet0,PortChannel001"
15) "direction"
16) "BOTH"
17) "type"
18) "ERSPAN"

127.0.0.1:6379> KEYS *MIRROR*
1) "MIRROR_SESSION_TABLE:session_1"
127.0.0.1:6379> HGETALL MIRROR_SESSION_TABLE:session_3i
1) "type"
2) "SPAN"
3) "dst_port"
4) "Ethernet0"
5) "src_port"
6) "Ethernet4,PortChannel002"
7) "direction"
8) "RX"
---------------------------------------------

### POLICER_TABLE
Expand Down
Loading