Skip to content

Commit 01444df

Browse files
authored
Merge branch 'Azure:master' into submodule_update
2 parents dff7ffc + d041e60 commit 01444df

File tree

17 files changed

+774
-28
lines changed

17 files changed

+774
-28
lines changed

files/build_templates/docker_image_ctl.j2

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ function updateSyslogConf()
3636
TARGET_IP=$(docker network inspect bridge --format={{ "'{{(index .IPAM.Config 0).Gateway}}'" }})
3737
CONTAINER_NAME="$DOCKERNAME"
3838
TMP_FILE="/tmp/rsyslog.$CONTAINER_NAME.conf"
39-
39+
{%- if docker_container_name == "database" %}
40+
python -c "import jinja2, os; paths=['/usr/share/sonic/templates']; loader = jinja2.FileSystemLoader(paths); env = jinja2.Environment(loader=loader, trim_blocks=True); template_file='/usr/share/sonic/templates/rsyslog-container.conf.j2'; template = env.get_template(os.path.basename(template_file)); data=template.render({\"target_ip\":\"$TARGET_IP\",\"container_name\":\"$CONTAINER_NAME\"}); print(data)" > $TMP_FILE
41+
{%- else %}
4042
sonic-cfggen -t /usr/share/sonic/templates/rsyslog-container.conf.j2 -a "{\"target_ip\": \"$TARGET_IP\", \"container_name\": \"$CONTAINER_NAME\" }" > $TMP_FILE
43+
{%- endif %}
4144
docker cp $TMP_FILE ${DOCKERNAME}:/etc/rsyslog.conf
4245
rm -rf $TMP_FILE
4346
fi

platform/broadcom/sai.mk

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
BRCM_SAI = libsaibcm_6.0.0.10-1_amd64.deb
2-
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/6.0/master/XGS/libsaibcm_6.0.0.10-1_amd64.deb?sv=2015-04-05&sr=b&sig=5fW6otWPCPrsSIXeomEcllS8sEDXMo0YOD8UhB370U0%3D&se=2035-07-22T20%3A50%3A51Z&sp=r"
3-
BRCM_SAI_DEV = libsaibcm-dev_6.0.0.10-1_amd64.deb
1+
LIBSAIBCM_VERSION = 6.0.0.10-1
2+
LIBSAIBCM_BRANCH_NAME = REL_6.0
3+
LIBSAIBCM_URL_PREFIX = "https://sonicstorage.blob.core.windows.net/public/sai/bcmsai/$(LIBSAIBCM_BRANCH_NAME)/$(LIBSAIBCM_VERSION)"
4+
5+
BRCM_SAI = libsaibcm_$(LIBSAIBCM_VERSION)_amd64.deb
6+
$(BRCM_SAI)_URL = "$(LIBSAIBCM_URL_PREFIX)/$(BRCM_SAI)"
7+
BRCM_SAI_DEV = libsaibcm-dev_$(LIBSAIBCM_VERSION)_amd64.deb
48
$(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV)))
5-
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/6.0/master/XGS/libsaibcm-dev_6.0.0.10-1_amd64.deb?sv=2015-04-05&sr=b&sig=8h7bO9EizzMXduSOf%2Ffc3JH0EcHxcE8p51LyUw0CA6o%3D&se=2035-07-22T20%3A51%3A57Z&sp=r"
9+
$(BRCM_SAI_DEV)_URL = "$(LIBSAIBCM_URL_PREFIX)/$(BRCM_SAI_DEV)"
610

711
# SAI module for DNX Asic family
8-
BRCM_DNX_SAI = libsaibcm_dnx_6.0.0.10-1_amd64.deb
9-
$(BRCM_DNX_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/6.0/master/DNX/libsaibcm_dnx_6.0.0.10-1_amd64.deb?sv=2015-04-05&sr=b&sig=J1lE1SI1Mtwrl0vZ2tAPvkNLKpkyz2XVgRe98DnPNfo%3D&se=2035-07-22T20%3A53%3A24Z&sp=r"
12+
BRCM_DNX_SAI = libsaibcm_dnx_$(LIBSAIBCM_VERSION)_amd64.deb
13+
$(BRCM_DNX_SAI)_URL = "$(LIBSAIBCM_URL_PREFIX)/$(BRCM_DNX_SAI)"
1014

1115
SONIC_ONLINE_DEBS += $(BRCM_SAI)
1216
SONIC_ONLINE_DEBS += $(BRCM_DNX_SAI)

platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py

+2-13
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
except ImportError as err:
2020
raise ImportError(str(err) + "- required module not found")
2121

22-
QSFP_DD_MODULE_ENC_OFFSET = 3
23-
QSFP_DD_MODULE_ENC_WIDTH = 1
2422
QSFP_INFO_OFFSET = 128
2523
SFP_INFO_OFFSET = 0
2624
QSFP_DD_PAGE0 = 0
@@ -205,11 +203,7 @@ def get_lpmode(self):
205203
lpmode_state = False
206204
try:
207205
if self.sfp_type == 'QSFP_DD':
208-
lpmode = self.read_eeprom(QSFP_DD_MODULE_ENC_OFFSET, QSFP_DD_MODULE_ENC_WIDTH)
209-
if lpmode is not None:
210-
if int(lpmode[0])>>1 == 1:
211-
return True
212-
return False
206+
return SfpOptoeBase.get_lpmode(self)
213207
else:
214208
# Port offset starts with 0x4000
215209
port_offset = 16384 + ((self.index-1) * 16)
@@ -265,12 +259,7 @@ def set_lpmode(self, lpmode):
265259
"""
266260
try:
267261
if self.sfp_type == 'QSFP_DD':
268-
if lpmode is True:
269-
write_val = 0x10
270-
else:
271-
write_val = 0x0
272-
273-
self.write_eeprom(26, 1, bytearray([write_val]))
262+
return SfpOptoeBase.set_lpmode(self, lpmode)
274263
else:
275264
# Port offset starts with 0x4000
276265
port_offset = 16384 + ((self.index-1) * 16)

platform/mellanox/hw-management.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
# Mellanox HW Management
1818

19-
MLNX_HW_MANAGEMENT_VERSION = 7i.0010.3330
19+
MLNX_HW_MANAGEMENT_VERSION = 7.0010.3331
2020

2121
export MLNX_HW_MANAGEMENT_VERSION
2222

rules/swss-common.mk

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ $(eval $(call add_derived_package,$(LIBSWSSCOMMON),$(LIBSWSSCOMMON_DEV)))
2020
ifeq ($(ENABLE_PY2_MODULES), y)
2121
PYTHON_SWSSCOMMON = python-swsscommon_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb
2222
$(eval $(call add_derived_package,$(LIBSWSSCOMMON),$(PYTHON_SWSSCOMMON)))
23+
else
24+
$(LIBSWSSCOMMON)_BUILD_ENV += DEB_BUILD_PROFILES=nopython2
2325
endif
2426

2527
PYTHON3_SWSSCOMMON = python3-swsscommon_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb

slave.mk

+4-4
Original file line numberDiff line numberDiff line change
@@ -1008,10 +1008,10 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
10081008
export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(IMAGE_DISTRO_DEBS_PATH)/$(deb))))"
10091009
export lazy_build_installer_debs="$(foreach deb, $($*_LAZY_BUILD_INSTALLS), $(addprefix $($(deb)_MACHINE)|,$(deb)))"
10101010
export installer_images="$(foreach docker, $($*_DOCKERS),\
1011-
$(addprefix $($(docker)_PACKAGE_NAME)|,\
1012-
$(addprefix $($(docker)_PATH)|,\
1013-
$(addprefix $($(docker)_MACHINE)|,\
1014-
$(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker)))))))"
1011+
$(addprefix $($(docker:-dbg.gz=.gz)_PACKAGE_NAME)|,\
1012+
$(addprefix $($(docker:-dbg.gz=.gz)_PATH)|,\
1013+
$(addprefix $($(docker:-dbg.gz=.gz)_MACHINE)|,\
1014+
$(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker:-dbg.gz=.gz)_VERSION),$(docker)))))))"
10151015
export sonic_packages="$(foreach package, $(SONIC_PACKAGES),\
10161016
$(addsuffix |$($(package)_DEFAULT_FEATURE_STATE_ENABLED),\
10171017
$(addsuffix |$($(package)_DEFAULT_FEATURE_OWNER),\

src/sonic-build-hooks/scripts/buildinfo_base.sh

+17
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ POST_VERSION_PATH=$BUILDINFO_PATH/post-versions
1111
VERSION_DEB_PREFERENCE=$BUILDINFO_PATH/versions/01-versions-deb
1212
WEB_VERSION_FILE=$VERSION_PATH/versions-web
1313
BUILD_WEB_VERSION_FILE=$BUILD_VERSION_PATH/versions-web
14+
REPR_MIRROR_URL_PATTERN='http:\/\/packages.trafficmanager.net\/debian'
1415

1516
. $BUILDINFO_PATH/config/buildinfo.config
1617

@@ -59,6 +60,22 @@ check_if_url_exist()
5960
fi
6061
}
6162

63+
# Enable or disable the reproducible mirrors
64+
set_reproducible_mirrors()
65+
{
66+
# Remove the charater # in front of the line if matched
67+
local expression="s/^#\(.*$REPR_MIRROR_URL_PATTERN\)/\1/"
68+
if [ "$1" = "-d" ]; then
69+
# Add the charater # in front of the line if match
70+
expression="s/^deb.*$REPR_MIRROR_URL_PATTERN/#\0/"
71+
fi
72+
73+
local mirrors="/etc/apt/sources.list $(ls /etc/apt/sources.list.d/)"
74+
for mirror in $mirrors; do
75+
sed -i "$expression" "$mirror"
76+
done
77+
}
78+
6279
download_packages()
6380
{
6481
local parameters=("$@")

src/sonic-build-hooks/scripts/post_run_buildinfo

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ rm -rf $BUILD_VERSION_PATH/*
1212

1313
# Disable the build hooks
1414
symlink_build_hooks -d
15+
set_reproducible_mirrors -d

src/sonic-build-hooks/scripts/pre_run_buildinfo

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ mkdir -p $LOG_PATH
1010
[ -d $PRE_VERSION_PATH ] && rm -rf $PRE_VERSION_PATH
1111
collect_version_files $PRE_VERSION_PATH
1212
symlink_build_hooks
13+
set_reproducible_mirrors
1314

1415
chmod -R a+rw $BUILDINFO_PATH
1516

src/sonic-swss-common

src/sonic-yang-models/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def run(self):
103103
'./yang-models/sonic-mgmt_interface.yang',
104104
'./yang-models/sonic-mgmt_port.yang',
105105
'./yang-models/sonic-mgmt_vrf.yang',
106+
'./yang-models/sonic-mirror-session.yang',
106107
'./yang-models/sonic-ntp.yang',
107108
'./yang-models/sonic-nat.yang',
108109
'./yang-models/sonic-pbh.yang',

src/sonic-yang-models/tests/files/sample_config_db.json

+21
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,27 @@
13971397
"pfc_to_pg_map" : "pfc_prio_to_pg_map2",
13981398
"pfc_enable" : "3,4"
13991399
}
1400+
},
1401+
1402+
"MIRROR_SESSION": {
1403+
"erspan": {
1404+
"dscp": "10",
1405+
"dst_ip": "11.1.1.1",
1406+
"gre_type": "0x1234",
1407+
"queue": "0",
1408+
"src_ip": "10.1.1.1",
1409+
"ttl": "10",
1410+
"type": "ERSPAN"
1411+
},
1412+
"span": {
1413+
"direction": "RX",
1414+
"type": "SPAN",
1415+
"dst_port": "Ethernet2",
1416+
"src_port": [
1417+
"Ethernet3",
1418+
"Ethernet4"
1419+
]
1420+
}
14001421
}
14011422
},
14021423
"SAMPLE_CONFIG_DB_UNKNOWN": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"MIRROR_ERSPAN_ENTRY_WITH_VALID_VALUES": {
3+
"desc": "Configuring ERSPAN entry with valid values."
4+
},
5+
"MIRROR_ERSPAN_ENTRY_WRONG_TYPE": {
6+
"desc": "Configurinng ERSPAN entry with invalid type",
7+
"eStrKey": "InvalidValue"
8+
},
9+
"MIRROR_ERSPAN_ENTRY_WRONG_DST_IP": {
10+
"desc": "Configurinng ERSPAN entry with invalid dst_ip",
11+
"eStrKey" : "Pattern"
12+
},
13+
"MIRROR_ERSPAN_ENTRY_WRONG_DST_IP_TYPE": {
14+
"desc": "Configurinng ERSPAN entry with invalid dst_ip",
15+
"eStrKey" : "When"
16+
},
17+
"MIRROR_ERSPAN_ENTRY_WRONG_SRC_IP": {
18+
"desc": "Configurinng ERSPAN entry with invalid src_ip",
19+
"eStrKey" : "Pattern"
20+
},
21+
"MIRROR_ERSPAN_ENTRY_WRONG_SRC_IP_TYPE": {
22+
"desc": "Configurinng ERSPAN entry with invalid src_ip",
23+
"eStrKey" : "When"
24+
},
25+
"MIRROR_ERSPAN_ENTRY_WRONG_GRE_TYPE": {
26+
"desc": "Configurinng ERSPAN entry with invalid GRE type",
27+
"eStrKey" : "Pattern"
28+
},
29+
"MIRROR_ERSPAN_ENTRY_GRE_WRONG_TYPE": {
30+
"desc": "Configurinng ERSPAN entry with invalid GRE type",
31+
"eStrKey" : "When"
32+
},
33+
"MIRROR_ERSPAN_ENTRY_WRONG_DSCP": {
34+
"desc": "Configurinng ERSPAN entry with invalid dscp",
35+
"eStr" : "Invalid dscp value"
36+
},
37+
"MIRROR_ERSPAN_ENTRY_WRONG_DSCP_TYPE": {
38+
"desc": "Configurinng ERSPAN entry with invalid dscp",
39+
"eStrKey" : "When"
40+
},
41+
"MIRROR_ERSPAN_ENTRY_WRONG_TTL": {
42+
"desc": "Configurinng ERSPAN entry with invalid ttl",
43+
"eStr": "Invalid TTL value"
44+
},
45+
"MIRROR_ERSPAN_ENTRY_WRONG_TTL_TYPE": {
46+
"desc": "Configurinng ERSPAN entry with invalid ttl",
47+
"eStrKey" : "When"
48+
},
49+
"MIRROR_ERSPAN_ENTRY_VALID_SRC_PORT": {
50+
"desc": "Configurinng ERSPAN entry with valid source port"
51+
},
52+
"MIRROR_ERSPAN_ENTRY_VALID_SRC_PORTCHANNEL": {
53+
"desc": "Configurinng ERSPAN entry with valid source portchannel"
54+
},
55+
"MIRROR_ERSPAN_ENTRY_INVALID_SRC_PORT": {
56+
"desc": "Configurinng ERSPAN entry with invalid source port",
57+
"eStrKey" : "InvalidValue"
58+
},
59+
"MIRROR_SPAN_ENTRY_WITH_VALID_VALUES": {
60+
"desc": "Configurinng SPAN entry with valid source and destination ports"
61+
},
62+
"MIRROR_SPAN_ENTRY_INVALID_DST_PORT": {
63+
"desc": "Configurinng SPAN entry with invalid destination ports",
64+
"eStrKey" : "InvalidValue"
65+
},
66+
"MIRROR_SPAN_ENTRY_INVALID_DST_PORT_TYPE": {
67+
"desc": "Configurinng SPAN entry with invalid destination ports",
68+
"eStrKey" : "When"
69+
},
70+
"MIRROR_SPAN_ENTRY_VALID_DST_PORT_CPU": {
71+
"desc": "Configurinng SPAN entry with valid destination port CPU"
72+
},
73+
"MIRROR_SPAN_ENTRY_INVALID_SRC_PORT": {
74+
"desc": "Configurinng SPAN entry with invalid destination ports",
75+
"eStrKey" : "InvalidValue"
76+
},
77+
"MIRROR_SPAN_ENTRY_INVALID_DIRECTION": {
78+
"desc": "Configurinng SPAN entry with invalid direction",
79+
"eStrKey": "InvalidValue"
80+
}
81+
}

0 commit comments

Comments
 (0)