Skip to content

Commit a1243c3

Browse files
bbinxieabdosigracelicdarlakshmstephenxs
authored
201911 (#199)
* [brcmsai]: Updated BRCM SAI Debina package to 3.7.5.1-2 (sonic-net#4916) Fix for Copp Rules not having Policer Rate-Limit applied. Signed-off-by: Abhishek Dosi <[email protected]> * [nephos]: upgrade Nephos SAI version to c749df (sonic-net#4814) Verified with Nephos nps8365 based platform Accton AS7116-54x. * "[config]: Multi ASIC loopback changes (sonic-net#4895) Resubmitting the changes for (sonic-net#4825) with fixes for sonic-bgpcdgd test failures Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]> * [mellanox]: Support warm reboot on MSN4700 (sonic-net#4910) * [Submodule Update] Sonic-platform-common [sfp_base] Update return value documentation of channel-specific methods (#98) [SfpBase] Fix key name typo in docstring (#99) [sfp] Tweak key names of some transceiver info fields (#97) [sfputil] Make SfpUtilHelper.get_physical_to_logical noexcept as in SfpUtilBase (#96) * [Submodule update] sonic-platform-daemons [xcvrd] Update key names in 'get_media_settings_value()' (#63) [xcvrd] Tweak some transceiver info key names (#62) * [Submodule update] sonic-utilities [sfpshow][mock_state_db] Tweak key names of some transceiver info fields (sonic-net#958) [config] Fix syntax error (sonic-net#966) [config] Fix indentation level in _get_disabled_services_list() (sonic-net#965) * [Submodule Update] sonic-swss [aclorch] Use IPv6 Next Header internally for protocol number on MLNX platform (sonic-net#1343) * [Submodule Update] Add support for attribute capability query in lua script (sonic-net#362) * Cherry-pick was not clean. Fixing it. Signed-off-by: Abhishek Dosi <[email protected]> * [telemetry] Call sonic-cfggen Once (sonic-net#4901) sonic-cfggen call is slow and this is taking place in the SONiC boot up process. The change uses templates to assemble all required vars into single template file. With this change, telemetry now calls once into sonic-cfggen. signed-off-by: Tamer Ahmed <[email protected]> * [mgmt docker] move pycryptodome installation to the end of the docker building (sonic-net#4917) * [mgmt docker] move pycryptodome installation to the end of the docker building Signed-off-by: Ying Xie <[email protected]> * pin down the version to current: 3.9.8 * comment * Add support for bcmsh and bcmcmd utlitites in multi ASIC devices (sonic-net#4926) Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]> This PR has changes to support accessing the bcmsh and bcmcmd utilities on multi ASIC devices Changes done - move the link of /var/run/sswsyncd from docker-syncd-brcm.mk to docker_image_ctl.j2 - update the bcmsh and bcmcmd scripts to take -n [ASIC_ID] as an argument on multi ASIC platforms * [caclmgrd] Improve code reuse (sonic-net#4931) Improve code reuse in `generate_block_ip2me_traffic_iptables_commands()` function. * [Submodule Update] sonic-utilities Intf table migration for APP_DB entries during warmboot (sonic-net#980) [Multi NPU] Time Improvements to the config reload/load_minigraph commands (sonic-net#917) * [Submodule Update] sonic-py-swssdk [MultiDB]: use python class composition to avoid confusion in base class (#74) * [Submodule update] sonic-snmpagent. Movent to 201911 Branch with with following PR's : Implement cbgpPeer2State in CiscoBgp4MIB (#119) Fix index nodes in LLDP tables whose access right is not-accessible. (#112) Fix quagga/FRR parser on IPv6 BGP sessions (#122) [lint] Fix some syntax errors or warnings (#127) Update README.md: Add lgtm badges (#128) [Multi-asic]: Support multi-asic platform (#126) Simplify test code (#132) [Multi-asic]: Namespace support for LLDP and Sensor tables (#131) Fix undefined variable and warning message (#134) Fix SNMP AgentX socket connection timeout when using Namespace.get_all() (#140) [Namespace] Fix interfaces counters in InterfacesMIB RFC 2863 (#141) Fix LGTM reported alert of PR#141 (#142) * [bgpcfgd] - Fix a key error during delete (sonic-net#4946) Co-authored-by: abdosi <[email protected]> Co-authored-by: gracelicd <[email protected]> Co-authored-by: arlakshm <[email protected]> Co-authored-by: Stephen Sun <[email protected]> Co-authored-by: Abhishek Dosi <[email protected]> Co-authored-by: Tamer Ahmed <[email protected]> Co-authored-by: Ying Xie <[email protected]> Co-authored-by: Joe LeVeque <[email protected]> Co-authored-by: Prince Sunny <[email protected]>
1 parent 3f4fdbe commit a1243c3

File tree

29 files changed

+256
-142
lines changed

29 files changed

+256
-142
lines changed

device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/sai_4700.xml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<!-- Device MAC address -->
66
<device-mac-address>00:02:03:04:05:00</device-mac-address>
77

8+
<!-- ISSU enabled -->
9+
<issu-enabled>1</issu-enabled>
10+
811
<!-- Number of ports in the following port list -->
912
<number-of-physical-ports>32</number-of-physical-ports>
1013

dockers/docker-base-stretch/Dockerfile.j2

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ RUN apt-get update && \
5555
libjemalloc1 \
5656
liblua5.1-0 \
5757
lua-bitop \
58-
lua-cjson
58+
lua-cjson \
59+
# for processing json files in bash environment
60+
jq
5961

6062
{% if CONFIGURED_ARCH == "armhf" %}
6163
# ip and ifconfig utility missing in docker for armhf

dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2

+15-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ipv6 prefix-list PL_LoopbackV6 permit {{ get_ipv6_loopback_address(LOOPBACK_INTE
1515
{% endif %}
1616
!
1717
!
18-
{% if DEVICE_METADATA['localhost']['sub_role'] == 'FrontEnd' %}
18+
{% if DEVICE_METADATA['localhost']['sub_role'] == 'FrontEnd' or DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
1919
route-map HIDE_INTERNAL permit 10
2020
set community local-AS
2121
!
@@ -38,16 +38,30 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
3838
{% endif %}
3939
!
4040
{# set router-id #}
41+
{% if multi_asic() %}
42+
bgp router-id {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback4096") | ip }}
43+
{% else %}
4144
bgp router-id {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}
45+
{% endif %}
4246
!
4347
{# advertise loopback #}
4448
network {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}/32
49+
{% if multi_asic() %}
50+
network {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback4096") | ip }}/32 route-map HIDE_INTERNAL
51+
{% endif %}
4552
!
4653
{% if get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") != 'None' %}
4754
address-family ipv6
4855
network {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}/64
4956
exit-address-family
5057
{% endif %}
58+
{% if multi_asic() %}
59+
{% if get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback4096") != 'None' %}
60+
address-family ipv6
61+
network {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback4096") | ip }}/64 route-map HIDE_INTERNAL
62+
exit-address-family
63+
{% endif %}
64+
{% endif %}
5165
{% endblock bgp_init %}
5266
!
5367
{% block vlan_advertisement %}

dockers/docker-sonic-mgmt/Dockerfile.j2

+4-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ RUN pip install cffi==1.10.0 \
4949
prettytable \
5050
psutil \
5151
pyasn1==0.1.9 \
52-
pycryptodome \
5352
pyfiglet \
5453
pylint==1.8.1 \
5554
pyro4 \
@@ -169,3 +168,7 @@ RUN ~/lib/azure-cli/bin/python -m pip install azure-keyvault==0.3.7 -U
169168
# Install Virtual Environment
170169
RUN python -m virtualenv --system-site-packages env-201811
171170
RUN env-201811/bin/pip install ansible==2.0.0.2
171+
172+
# NOTE: There is an ordering dependency for pycryptodome. Leaving this at
173+
# the end until we figure that out.
174+
RUN pip install pycryptodome==3.9.8

dockers/docker-sonic-telemetry/Dockerfile.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN apt-get clean -y && \
2626
apt-get autoremove -y && \
2727
rm -rf /debs
2828

29-
COPY ["start.sh", "telemetry.sh", "dialout.sh", "/usr/bin/"]
29+
COPY ["start.sh", "telemetry.sh", "dialout.sh", "telemetry_vars.j2", "/usr/bin/"]
3030
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
3131
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
3232
COPY ["critical_processes", "/etc/supervisor"]

dockers/docker-sonic-telemetry/telemetry.sh

+19-16
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,38 @@
22

33
# Try to read telemetry and certs config from ConfigDB.
44
# Use default value if no valid config exists
5-
X509=`sonic-cfggen -d -v "DEVICE_METADATA['x509']"`
6-
gnmi=`sonic-cfggen -d -v "TELEMETRY['gnmi']"`
7-
certs=`sonic-cfggen -d -v "TELEMETRY['certs']"`
5+
TELEMETRY_VARS=$(sonic-cfggen -d -t telemetry_vars.j2)
6+
TELEMETRY_VARS=${TELEMETRY_VARS//[\']/\"}
7+
X509=$(echo $TELEMETRY_VARS | jq -r '.x509')
8+
GNMI=$(echo $TELEMETRY_VARS | jq -r '.gnmi')
9+
CERTS=$(echo $TELEMETRY_VARS | jq -r '.certs')
810

911
TELEMETRY_ARGS=" -logtostderr"
1012
export CVL_SCHEMA_PATH=/usr/sbin/schema
1113

12-
if [ -n "$certs" ]; then
13-
SERVER_CRT=`sonic-cfggen -d -v "TELEMETRY['certs']['server_crt']"`
14-
SERVER_KEY=`sonic-cfggen -d -v "TELEMETRY['certs']['server_key']"`
14+
if [ -n "$CERTS" ]; then
15+
SERVER_CRT=$(echo $CERTS | jq -r '.server_crt')
16+
SERVER_KEY=$(echo $CERTS | jq -r '.server_key')
1517
if [ -z $SERVER_CRT ] || [ -z $SERVER_KEY ]; then
1618
TELEMETRY_ARGS+=" --insecure"
1719
else
1820
TELEMETRY_ARGS+=" --server_crt $SERVER_CRT --server_key $SERVER_KEY "
1921
fi
2022

21-
CA_CRT=`sonic-cfggen -d -v "TELEMETRY['certs']['ca_crt']"`
23+
CA_CRT=$(echo $CERTS | jq -r '.ca_crt')
2224
if [ ! -z $CA_CRT ]; then
2325
TELEMETRY_ARGS+=" --ca_crt $CA_CRT"
2426
fi
2527
elif [ -n "$X509" ]; then
26-
SERVER_CRT=`sonic-cfggen -d -v "DEVICE_METADATA['x509']['server_crt']"`
27-
SERVER_KEY=`sonic-cfggen -d -v "DEVICE_METADATA['x509']['server_key']"`
28+
SERVER_CRT=$(echo $X509 | jq -r '.server_crt')
29+
SERVER_KEY=$(echo $X509 | jq -r '.server_key')
2830
if [ -z $SERVER_CRT ] || [ -z $SERVER_KEY ]; then
2931
TELEMETRY_ARGS+=" --insecure"
3032
else
3133
TELEMETRY_ARGS+=" --server_crt $SERVER_CRT --server_key $SERVER_KEY "
3234
fi
3335

34-
CA_CRT=`sonic-cfggen -d -v "DEVICE_METADATA['x509']['ca_crt']"`
36+
CA_CRT=$(echo $X509 | jq -r '.ca_crt')
3537
if [ ! -z $CA_CRT ]; then
3638
TELEMETRY_ARGS+=" --ca_crt $CA_CRT"
3739
fi
@@ -40,19 +42,20 @@ else
4042
fi
4143

4244
# If no configuration entry exists for TELEMETRY, create one default port
43-
if [ -z "$gnmi" ]; then
44-
sonic-db-cli CONFIG_DB hset "TELEMETRY|gnmi" port 8080
45+
if [ -z "$GNMI" ]; then
46+
PORT=8080
47+
sonic-db-cli CONFIG_DB hset "TELEMETRY|gnmi" port $PORT
48+
else
49+
PORT=$(echo $GNMI | jq -r '.port')
4550
fi
46-
47-
PORT=`sonic-cfggen -d -v "TELEMETRY['gnmi']['port']"`
4851
TELEMETRY_ARGS+=" --port $PORT"
4952

50-
CLIENT_AUTH=`sonic-cfggen -d -v "TELEMETRY['gnmi']['client_auth']"`
53+
CLIENT_AUTH=$(echo $GNMI | jq -r '.client_auth')
5154
if [ -z $CLIENT_AUTH ] || [ $CLIENT_AUTH == "false" ]; then
5255
TELEMETRY_ARGS+=" --allow_no_client_auth"
5356
fi
5457

55-
LOG_LEVEL=`sonic-cfggen -d -v "TELEMETRY['gnmi']['log_level']"`
58+
LOG_LEVEL=$(echo $GNMI | jq -r '.log_level')
5659
if [ ! -z $LOG_LEVEL ]; then
5760
TELEMETRY_ARGS+=" -v=$LOG_LEVEL"
5861
else
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"certs": "{% if "certs" in TELEMETRY.keys() %}{{ TELEMETRY["certs"] }}{% endif %}",
3+
"gnmi" : "{% if "gnmi" in TELEMETRY.keys() %}{{ TELEMETRY["gnmi"] }}{% endif %}",
4+
"x509" : "{% if "x509" in DEVICE_METADATA.keys() %}{{ DEVICE_METADATA["x509"] }}{% endif %}"
5+
}

files/build_templates/docker_image_ctl.j2

+5
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ start() {
299299
--tmpfs /tmp \
300300
{%- endif %}
301301
{%- endif %}
302+
{%- if sonic_asic_platform == "broadcom" %}
303+
{%- if docker_container_name == "syncd" %}
304+
-v /var/run/docker-syncd$DEV:/var/run/sswsyncd \
305+
{%- endif %}
306+
{%- endif %}
302307
{%- if docker_container_name == "bgp" %}
303308
-v /etc/sonic/frr/$DEV:/etc/frr:rw \
304309
{%- endif %}

files/image_config/caclmgrd/caclmgrd

+28-80
Original file line numberDiff line numberDiff line change
@@ -134,89 +134,37 @@ class ControlPlaneAclManager(object):
134134
return tcp_flags_str
135135

136136
def generate_block_ip2me_traffic_iptables_commands(self):
137-
LOOPBACK_INTERFACE_TABLE_NAME = "LOOPBACK_INTERFACE"
138-
MGMT_INTERFACE_TABLE_NAME = "MGMT_INTERFACE"
139-
VLAN_INTERFACE_TABLE_NAME = "VLAN_INTERFACE"
140-
PORTCHANNEL_INTERFACE_TABLE_NAME = "PORTCHANNEL_INTERFACE"
141-
INTERFACE_TABLE_NAME = "INTERFACE"
137+
INTERFACE_TABLE_NAME_LIST = [
138+
"LOOPBACK_INTERFACE",
139+
"MGMT_INTERFACE",
140+
"VLAN_INTERFACE",
141+
"PORTCHANNEL_INTERFACE",
142+
"INTERFACE"
143+
]
142144

143145
block_ip2me_cmds = []
144146

145-
# Add iptables rules to drop all packets destined for loopback interface IP addresses
146-
loopback_iface_table = self.config_db.get_table(LOOPBACK_INTERFACE_TABLE_NAME)
147-
if loopback_iface_table:
148-
for key, _ in loopback_iface_table.iteritems():
149-
if not _ip_prefix_in_key(key):
150-
continue
151-
iface_name, iface_cidr = key
152-
ip_ntwrk = ipaddress.ip_network(iface_cidr, strict=False)
153-
if isinstance(ip_ntwrk, ipaddress.IPv4Network):
154-
block_ip2me_cmds.append("iptables -A INPUT -d {}/{} -j DROP".format(ip_ntwrk.network_address, ip_ntwrk.max_prefixlen))
155-
elif isinstance(ip_ntwrk, ipaddress.IPv6Network):
156-
block_ip2me_cmds.append("ip6tables -A INPUT -d {}/{} -j DROP".format(ip_ntwrk.network_address, ip_ntwrk.max_prefixlen))
157-
else:
158-
log_warning("Unrecognized IP address type on interface '{}': {}".format(iface_name, ip_ntwrk))
159-
160-
# Add iptables rules to drop all packets destined for management interface IP addresses
161-
mgmt_iface_table = self.config_db.get_table(MGMT_INTERFACE_TABLE_NAME)
162-
if mgmt_iface_table:
163-
for key, _ in mgmt_iface_table.iteritems():
164-
if not _ip_prefix_in_key(key):
165-
continue
166-
iface_name, iface_cidr = key
167-
ip_ntwrk = ipaddress.ip_network(iface_cidr, strict=False)
168-
if isinstance(ip_ntwrk, ipaddress.IPv4Network):
169-
block_ip2me_cmds.append("iptables -A INPUT -d {}/{} -j DROP".format(ip_ntwrk.network_address, ip_ntwrk.max_prefixlen))
170-
elif isinstance(ip_ntwrk, ipaddress.IPv6Network):
171-
block_ip2me_cmds.append("ip6tables -A INPUT -d {}/{} -j DROP".format(ip_ntwrk.network_address, ip_ntwrk.max_prefixlen))
172-
else:
173-
log_warning("Unrecognized IP address type on interface '{}': {}".format(iface_name, ip_ntwrk))
174-
175-
# Add iptables rules to drop all packets destined for our VLAN interface gateway IP addresses
176-
vlan_iface_table = self.config_db.get_table(VLAN_INTERFACE_TABLE_NAME)
177-
if vlan_iface_table:
178-
for key, _ in vlan_iface_table.iteritems():
179-
if not _ip_prefix_in_key(key):
180-
continue
181-
iface_name, iface_cidr = key
182-
ip_ntwrk = ipaddress.ip_network(iface_cidr, strict=False)
183-
first_host = next(ip_ntwrk.hosts())
184-
if isinstance(ip_ntwrk, ipaddress.IPv4Network):
185-
block_ip2me_cmds.append("iptables -A INPUT -d {}/{} -j DROP".format(first_host, ip_ntwrk.max_prefixlen))
186-
elif isinstance(ip_ntwrk, ipaddress.IPv6Network):
187-
block_ip2me_cmds.append("ip6tables -A INPUT -d {}/{} -j DROP".format(first_host, ip_ntwrk.max_prefixlen))
188-
else:
189-
log_warning("Unrecognized IP address type on interface '{}': {}".format(iface_name, ip_ntwrk))
190-
191-
# Add iptables rules to drop all packets destined for point-to-point interface IP addresses
192-
# (All portchannel interfaces and configured front-panel interfaces)
193-
portchannel_iface_table = self.config_db.get_table(PORTCHANNEL_INTERFACE_TABLE_NAME)
194-
if portchannel_iface_table:
195-
for key, _ in portchannel_iface_table.iteritems():
196-
if not _ip_prefix_in_key(key):
197-
continue
198-
iface_name, iface_cidr = key
199-
ip_ntwrk = ipaddress.ip_network(iface_cidr, strict=False)
200-
if isinstance(ip_ntwrk, ipaddress.IPv4Network):
201-
block_ip2me_cmds.append("iptables -A INPUT -d {}/{} -j DROP".format(ip_ntwrk.network_address, ip_ntwrk.max_prefixlen))
202-
elif isinstance(ip_ntwrk, ipaddress.IPv6Network):
203-
block_ip2me_cmds.append("ip6tables -A INPUT -d {}/{} -j DROP".format(ip_ntwrk.network_address, ip_ntwrk.max_prefixlen))
204-
else:
205-
log_warning("Unrecognized IP address type on interface '{}': {}".format(iface_name, ip_ntwrk))
206-
207-
iface_table = self.config_db.get_table(INTERFACE_TABLE_NAME)
208-
if iface_table:
209-
for key, _ in iface_table.iteritems():
210-
if not _ip_prefix_in_key(key):
211-
continue
212-
iface_name, iface_cidr = key
213-
ip_ntwrk = ipaddress.ip_network(iface_cidr, strict=False)
214-
if isinstance(ip_ntwrk, ipaddress.IPv4Network):
215-
block_ip2me_cmds.append("iptables -A INPUT -d {}/{} -j DROP".format(ip_ntwrk.network_address, ip_ntwrk.max_prefixlen))
216-
elif isinstance(ip_ntwrk, ipaddress.IPv6Network):
217-
block_ip2me_cmds.append("ip6tables -A INPUT -d {}/{} -j DROP".format(ip_ntwrk.network_address, ip_ntwrk.max_prefixlen))
218-
else:
219-
log_warning("Unrecognized IP address type on interface '{}': {}".format(iface_name, ip_ntwrk))
147+
# Add iptables rules to drop all packets destined for peer-to-peer interface IP addresses
148+
for iface_table_name in INTERFACE_TABLE_NAME_LIST:
149+
iface_table = self.config_db.get_table(iface_table_name)
150+
if iface_table:
151+
for key, _ in iface_table.iteritems():
152+
if not _ip_prefix_in_key(key):
153+
continue
154+
155+
iface_name, iface_cidr = key
156+
ip_ntwrk = ipaddress.ip_network(iface_cidr, strict=False)
157+
158+
# For VLAN interfaces, the IP address we want to block is the default gateway (i.e.,
159+
# the first available host IP address of the VLAN subnet)
160+
ip_addr = next(ip_ntwrk.hosts()) if iface_table_name == "VLAN_INTERFACE" else ip_ntwrk.network_address
161+
162+
if isinstance(ip_ntwrk, ipaddress.IPv4Network):
163+
block_ip2me_cmds.append("iptables -A INPUT -d {}/{} -j DROP".format(ip_addr, ip_ntwrk.max_prefixlen))
164+
elif isinstance(ip_ntwrk, ipaddress.IPv6Network):
165+
block_ip2me_cmds.append("ip6tables -A INPUT -d {}/{} -j DROP".format(ip_addr, ip_ntwrk.max_prefixlen))
166+
else:
167+
log_warning("Unrecognized IP address type on interface '{}': {}".format(iface_name, ip_ntwrk))
220168

221169
return block_ip2me_cmds
222170

platform/broadcom/docker-syncd-brcm.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
1212
$(LIBSAIREDIS_DBG)
1313

1414
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
15-
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
1615

1716
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd
1817
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
18+
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcm_common:/usr/bin/bcm_common
1919
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
function help()
4+
{
5+
echo "Usage: $0 -n [0 to $(($NUM_ASIC-1))]" 1>&2; exit 1;
6+
7+
}
8+
9+
10+
DEV=""
11+
12+
PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
13+
14+
# Parse the device specific asic conf file, if it exists
15+
16+
ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf
17+
if [ -f "$ASIC_CONF" ]; then
18+
source $ASIC_CONF
19+
fi
20+
21+
22+
if [[ ($NUM_ASIC -gt 1) ]]; then
23+
OPTIND=1
24+
25+
while getopts ":n:h:" opt; do
26+
case "${opt}" in
27+
h) help
28+
exit 0
29+
;;
30+
n) DEV=${OPTARG}
31+
[ $DEV -lt $NUM_ASIC -a $DEV -ge 0 ] || help
32+
;;
33+
esac
34+
done
35+
shift "$((OPTIND-1))"
36+
37+
if [ -z "${DEV}" ]; then
38+
help
39+
fi
40+
fi
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
#!/bin/bash
22

3-
docker exec -i syncd bcmcmd "$@"
3+
BCM_COMMON=/usr/bin/bcm_common
4+
if [ -f "$BCM_COMMON" ]; then
5+
source $BCM_COMMON
6+
fi
7+
docker exec -i syncd$DEV bcmcmd "$@"
8+
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
#!/bin/bash
22

3-
docker exec -it syncd bcmsh "$@"
3+
BCM_COMMON=/usr/bin/bcm_common
4+
if [ -f "$BCM_COMMON" ]; then
5+
source $BCM_COMMON
6+
fi
7+
8+
docker exec -it syncd$DEV bcmsh "$@"

platform/broadcom/sai.mk

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
BRCM_SAI = libsaibcm_3.7.5.1-1_amd64.deb
2-
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm_3.7.5.1-1_amd64.deb?sv=2015-04-05&sr=b&sig=cxmXsJ%2BjcnR9ckFRbMigIbkzOncYkiV04weL%2FVPKBmk%3D&se=2034-03-06T00%3A30%3A30Z&sp=r"
3-
BRCM_SAI_DEV = libsaibcm-dev_3.7.5.1-1_amd64.deb
1+
BRCM_SAI = libsaibcm_3.7.5.1-2_amd64.deb
2+
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm_3.7.5.1-2_amd64.deb?sv=2015-04-05&sr=b&sig=NMXmDm7ME%2BDN9n4kw6wXgIVmIjRifu%2FWV0UbLU9qllw%3D&se=2034-03-17T05%3A53%3A29Z&sp=r"
3+
BRCM_SAI_DEV = libsaibcm-dev_3.7.5.1-2_amd64.deb
44
$(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV)))
5-
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm-dev_3.7.5.1-1_amd64.deb?sv=2015-04-05&sr=b&sig=LVgghAv75VG4idW6xfpId%2FlrvPBja7uBQeTbjZsR3CA%3D&se=2034-03-06T00%3A31%3A30Z&sp=r"
5+
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm-dev_3.7.5.1-2_amd64.deb?sv=2015-04-05&sr=b&sig=3Q8S5fwg7WV%2BCKVwMALrf8dpQWK2cSD4J4zxbVht%2BT8%3D&se=2034-03-17T05%3A54%3A05Z&sp=r"
66

77
SONIC_ONLINE_DEBS += $(BRCM_SAI)
88
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)

platform/nephos/rules.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SONIC_ONLINE_FILES += $(NPX_DIAG) $(WARM_VERIFIER) $(DSSERVE)
2323
SONIC_ALL += $(SONIC_ONE_IMAGE) $(DOCKER_FPM)
2424

2525
# Inject nephos sai into sairedis
26-
$(LIBSAIREDIS)_DEPENDS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV)
26+
$(LIBSAIREDIS)_DEPENDS += $(NEPHOS_SAI)
2727
ifeq ($(ENABLE_SYNCD_RPC),y)
2828
$(LIBSAIREDIS)_DEPENDS += $(LIBSAITHRIFT_DEV)
2929
endif

0 commit comments

Comments
 (0)