-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[swss]: Generate config files for Everflow and IPinIP from minigraph #507
Changes from 2 commits
132759b
608094d
385f4dd
fdab84b
0e733f1
628bff4
30346df
8d22a69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash -e | ||
|
||
mkdir -p /etc/swss/config.d/ | ||
|
||
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/ipinip.json.j2 > /etc/swss/config.d/ipinip.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to support the case that ErspanDestinationIpv4 is not defined in minigraph as well. Current implementation will generate an illegal json therefore crashes docker-orchagent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/mirror.json.j2 > /etc/swss/config.d/mirror.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : { | ||
"tunnel_type":"IPINIP", | ||
"src_ip":"{{ minigraph_lo_interfaces[0]['addr'] }}", | ||
"dst_ip":"{{ minigraph_lo_interfaces[0]['addr'] }}", | ||
"dscp_mode":"uniform", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you change the dscp_mode to pipe? And validate whether it will work on mlnx platform as well if possible? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pipe currently is not supported on Mellanox platforms. Will left it "uniform" for Mellanox platform and pipe for other There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, please change broadcom platform to pipe mode. use the asic_type. |
||
{% if minigraph_hwsku in [ 'ACS-MSN2700', 'ACS-MSN2410', 'ACS-MSN2100' ] %} | ||
"ecn_mode":"standard", | ||
{% else %} | ||
"ecn_mode":"copy_from_outer", | ||
{% endif %} | ||
"ttl_mode":"pipe" | ||
}, | ||
"OP": "SET" | ||
} | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"MIRROR_SESSION_TABLE:everflow": { | ||
"src_ip": "{{ minigraph_lo_interfaces[0]['addr'] }}", | ||
"dst_ip": "{{ erspan_dst[0] }}", | ||
{% if minigraph_hwsku in [ 'ACS-MSN2700', 'ACS-MSN2410', 'ACS-MSN2100' ] %} | ||
"gre_type": "0x6558", | ||
{% else %} | ||
"gre_type": "0x88be", | ||
{% endif %} | ||
"dscp": "8", | ||
"ttl": "255", | ||
"queue": "1" | ||
}, | ||
"OP": "SET" | ||
} | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : { | ||
"tunnel_type":"IPINIP", | ||
"src_ip":"10.1.0.32", | ||
"dst_ip":"10.1.0.32", | ||
"dscp_mode":"uniform", | ||
"ecn_mode":"copy_from_outer", | ||
"ttl_mode":"pipe" | ||
}, | ||
"OP": "SET" | ||
} | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"MIRROR_SESSION_TABLE:everflow": { | ||
"src_ip": "10.1.0.32", | ||
"dst_ip": "2.2.2.2", | ||
"gre_type": "0x88be", | ||
"dscp": "8", | ||
"ttl": "255", | ||
"queue": "1" | ||
}, | ||
"OP": "SET" | ||
} | ||
] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marian-pritsak has a PR #441 that merges config.sh and start.sh back into a single file. I don't exactly know his reason, but I'll suggest you sync with him to see if he has any concern on using two scripts instead of one.