Skip to content

Commit

Permalink
Merge branch 'master' into fix-syncd-stop
Browse files Browse the repository at this point in the history
  • Loading branch information
Junchao-Mellanox committed Mar 8, 2023
2 parents 02170bd + 2ba2ff1 commit 43eda20
Show file tree
Hide file tree
Showing 375 changed files with 28,148 additions and 3,232 deletions.
4 changes: 1 addition & 3 deletions .azure-pipelines/azure-pipelines-repd-build-variables.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
variables:
${{ if eq(variables['Build.Reason'],'PullRequest') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=$([[ "$(System.PullRequest.TargetBranch)" =~ ^20[2-9][0-9]{3}$ ]] && echo deb,py2,py3,web,git,docker)'
${{ elseif ne(variables['Build.SourceBranchName'],'master') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
${{ else }}:
VERSION_CONTROL_OPTIONS: ''
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
11 changes: 10 additions & 1 deletion .azure-pipelines/official-build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ schedules:
- master
- 202012

resources:
repositories:
- repository: buildimage
type: github
name: sonic-net/sonic-buildimage
ref: master
endpoint: sonic-net

trigger: none
pr: none

Expand All @@ -20,7 +28,8 @@ stages:
variables:
- name: CACHE_MODE
value: cache
- template: azure-pipelines-repd-build-variables.yml
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml@buildimage
- template: .azure-pipelines/template-variables.yml@buildimage
jobs:
- template: azure-pipelines-build.yml
parameters:
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/template-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ variables:
SONIC_BUILD_RETRY_INTERVAL: 600
DOCKER_BUILDKIT: 0
DOCKER_BUILD_TIMEOUT: 3600
MIRROR_SNAPSHOT: y
1 change: 1 addition & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- opened
- reopened
branches:
- master
- '202012'
- '202[1-9][0-9][0-9]'
- '20[3-9][0-9][0-9][0-9]'
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@
[submodule "src/sonic-mgmt-framework"]
path = src/sonic-mgmt-framework
url = https://github.com/sonic-net/sonic-mgmt-framework
[submodule "Switch-SDK-drivers"]
path = platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
url = https://github.com/Mellanox/Switch-SDK-drivers
[submodule "src/sonic-ztp"]
path = src/sonic-ztp
url = https://github.com/sonic-net/sonic-ztp
Expand Down
1 change: 1 addition & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
MDEBUG=$(MDEBUG) \
PASSWORD=$(PASSWORD) \
USERNAME=$(USERNAME) \
CHANGE_DEFAULT_PASSWORD=$(CHANGE_DEFAULT_PASSWORD) \
SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \
SONIC_USE_DOCKER_BUILDKIT=$(SONIC_USE_DOCKER_BUILDKIT) \
VS_PREPARE_MEM=$(VS_PREPARE_MEM) \
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
*static analysis*:

[![Total alerts](https://img.shields.io/lgtm/alerts/g/Azure/sonic-buildimage.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Azure/sonic-buildimage/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Azure/sonic-buildimage.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Azure/sonic-buildimage/context:python)

*master builds*:

[![Barefoot](https://dev.azure.com/mssonic/build/_apis/build/status/barefoot/Azure.sonic-buildimage.official.barefoot?branchName=master&label=Barefoot)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=146&branchName=master)
Expand Down
23 changes: 9 additions & 14 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ stages:

- stage: Build
pool: sonicbld
variables:
INSTALL_DEBUG_TOOLS: y
dependsOn: []
jobs:
- template: .azure-pipelines/azure-pipelines-build.yml
Expand Down Expand Up @@ -174,8 +176,7 @@ stages:
section: part-2

- job: t0_testbedv2
pool:
vmImage: 'ubuntu-20.04'
pool: ubuntu-20.04
displayName: "kvmtest-t0 by TestbedV2"
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
Expand All @@ -188,8 +189,7 @@ stages:
MAX_WORKER: $(T0_INSTANCE_NUM)

- job: t0_2vlans_testbedv2
pool:
vmImage: 'ubuntu-20.04'
pool: ubuntu-20.04
displayName: "kvmtest-t0-2vlans by TestbedV2"
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
Expand Down Expand Up @@ -252,8 +252,7 @@ stages:
vmtype: ceos

- job: t1_lag_testbedv2
pool:
vmImage: 'ubuntu-20.04'
pool: ubuntu-20.04
displayName: "kvmtest-t1-lag by TestbedV2"
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
Expand Down Expand Up @@ -319,8 +318,7 @@ stages:

- job: multi_asic_testbedv2
displayName: "kvmtest-multi-asic-t1-lag by TestbedV2"
pool:
vmImage: 'ubuntu-20.04'
pool: ubuntu-20.04
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
Expand All @@ -334,8 +332,7 @@ stages:
NUM_ASIC: 4

- job: dualtor_testbedv2
pool:
vmImage: 'ubuntu-20.04'
pool: ubuntu-20.04
displayName: "kvmtest-dualtor-t0 by TestbedV2"
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
Expand All @@ -350,8 +347,7 @@ stages:

- job: sonic_t0_testbedv2
displayName: "kvmtest-t0-sonic by TestbedV2"
pool:
vmImage: 'ubuntu-20.04'
pool: ubuntu-20.04
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
Expand All @@ -368,8 +364,7 @@ stages:

- job: wan_testbedv2
displayName: "kvmtest-wan by TestbedV2"
pool:
vmImage: 'ubuntu-20.04'
pool: ubuntu-20.04
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
Expand Down
10 changes: 10 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,16 @@ sudo LANG=C chroot $FILESYSTEM_ROOT umount /proc || true
## Prepare empty directory to trigger mount move in initramfs-tools/mount_loop_root, implemented by patching
sudo mkdir $FILESYSTEM_ROOT/host


if [[ "$CHANGE_DEFAULT_PASSWORD" == "y" ]]; then
## Expire default password for exitsing users that can do login
default_users=$(cat $FILESYSTEM_ROOT/etc/passwd | grep "/home"| grep ":/bin/bash\|:/bin/sh" | awk -F ":" '{print $1}' 2> /dev/null)
for user in $default_users
do
sudo LANG=C chroot $FILESYSTEM_ROOT passwd -e ${user}
done
fi

## Compress most file system into squashfs file
sudo rm -f $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS
## Output the file system total size for diag purpose
Expand Down
27 changes: 26 additions & 1 deletion check_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def main():
parser = argparse.ArgumentParser(description='test_login cmdline parser')
parser.add_argument('-u', default="admin", help='login user name')
parser.add_argument('-P', default="YourPaSsWoRd", help='login password')
parser.add_argument('-N', default="Test@2022", help='new password')
parser.add_argument('-p', type=int, default=9000, help='local port')

args = parser.parse_args()
Expand All @@ -20,6 +21,7 @@ def main():
cmd_prompt = "{}@sonic:~\$ $".format(args.u)
grub_selection = "The highlighted entry will be executed"
firsttime_prompt = 'firsttime_exit'
passwd_change_prompt = ['Current password:', 'New password:', 'Retype new password:']

i = 0
while True:
Expand All @@ -36,7 +38,6 @@ def main():
# select default SONiC Image
p.expect(grub_selection)
p.sendline()

# bootup sonic image
while True:
i = p.expect([login_prompt, passwd_prompt, firsttime_prompt, cmd_prompt])
Expand All @@ -46,6 +47,30 @@ def main():
elif i == 1:
# send password
p.sendline(args.P)
# Check for password change prompt
try:
p.expect('Current password:', timeout=2)
except pexpect.TIMEOUT:
break
else:
# send old password for password prompt
p.sendline(args.P)
p.expect(passwd_change_prompt[1])
# send new password
p.sendline(args.N)
p.expect(passwd_change_prompt[2])
# retype new password
p.sendline(args.N)
time.sleep(1)
# Restore default password
p.sendline('passwd {}'.format(args.u))
p.expect(passwd_change_prompt[0])
p.sendline(args.N)
p.expect(passwd_change_prompt[1])
p.sendline(args.P)
p.expect(passwd_change_prompt[2])
p.sendline(args.P)
break
elif i == 2:
# fix a login timeout issue, caused by the login_prompt message mixed with the output message of the rc.local
time.sleep(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,15 +493,16 @@ tm_port_header_type_out_233.BCM8869X=CPU
tm_port_header_type_in_240.BCM8869X=INJECTED_2
tm_port_header_type_out_240.BCM8869X=RAW

sai_recycle_port_lane_base=0
ucode_port_221.BCM8869X=RCY.21:core_0.221
ucode_port_222.BCM8869X=RCY.22:core_1.222
tm_port_header_type_out_221.BCM8869X=ETH
tm_port_header_type_in_221.BCM8869X=ETH
tm_port_header_type_out_222.BCM8869X=ETH
tm_port_header_type_in_222.BCM8869X=ETH
port_init_speed_221.BCM8869X=400000
port_init_speed_222.BCM8869X=400000
#RCY
sai_recycle_port_lane_base=200
ucode_port_49.BCM8869X=RCY0:core_0.49
ucode_port_50.BCM8869X=RCY1:core_1.50
tm_port_header_type_out_49.BCM8869X=ETH
tm_port_header_type_in_49.BCM8869X=ETH
tm_port_header_type_out_50.BCM8869X=ETH
tm_port_header_type_in_50.BCM8869X=ETH
port_init_speed_49.BCM8869X=400000
port_init_speed_50.BCM8869X=400000

# fabric
port_init_cl72_sfi=1
Expand Down Expand Up @@ -788,6 +789,7 @@ dport_map_direct.BCM8869X=1
pmf_sexem3_stage.BCM8869X=IPMF3
rif_id_max=0x6000

appl_param_nof_ports_per_modid=64
dma_desc_aggregator_chain_length_max.BCM8869X=1000
dma_desc_aggregator_buff_size_kb.BCM8869X=100
dma_desc_aggregator_timeout_usec.BCM8869X=1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ Ethernet176 54,55 Ethernet45/1 45 Ext 100000 1
Ethernet180 50,51 Ethernet46/1 46 Ext 100000 1 46 8
Ethernet184 52,53 Ethernet47/1 47 Ext 100000 1 47 8
Ethernet188 48,49 Ethernet48/1 48 Ext 100000 1 48 8
Ethernet-Rec0 221 Recirc0/0 51 Rec 400000 0 221 8
Ethernet-IB0 222 Recirc0/1 52 Inb 400000 1 222 8
Ethernet-Rec0 249 Recirc0/0 51 Rec 400000 0 49 8
Ethernet-IB0 250 Recirc0/1 52 Inb 400000 1 50 8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{%- set default_topo = 't2' %}
{%- include 'buffers_config.j2' %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{%- set default_cable = '300m' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,144,8) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "6441610000",
"type": "both",
"mode": "dynamic",
"xoff": "11354112"
}
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
"pool":"ingress_lossless_pool",
"size":"1280",
"xon_offset": "2560",
"dynamic_th":"0"
},
"egress_lossless_profile": {
"pool":"ingress_lossless_pool",
"size":"0",
"static_th":"33030144"
},
"egress_lossy_profile": {
"pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"-1"
}
},
{%- endmacro %}
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,15 @@ tm_port_header_type_in_219=INJECTED_2
port_init_speed_sat=400000

### RCY
sai_recycle_port_lane_base=0
ucode_port_221=RCY.21:core_0.221
ucode_port_222=RCY.22:core_1.222
tm_port_header_type_out_221=ETH
tm_port_header_type_in_221=ETH
tm_port_header_type_out_222=ETH
tm_port_header_type_in_222=ETH
port_init_speed_221=400000
port_init_speed_222=400000
sai_recycle_port_lane_base=200
ucode_port_49=RCY0:core_0.49
ucode_port_50=RCY1:core_1.50
tm_port_header_type_out_49=ETH
tm_port_header_type_in_49=ETH
tm_port_header_type_out_50=ETH
tm_port_header_type_in_50=ETH
port_init_speed_49=400000
port_init_speed_50=400000

#OLP port
tm_port_header_type_in_240=INJECTED_2
Expand Down Expand Up @@ -981,5 +981,6 @@ serdes_tx_taps_34=nrz:-5:83:-22:0:0:0
serdes_tx_taps_35=nrz:-4:75:-21:0:0:0
serdes_tx_taps_36=nrz:-8:89:-29:0:0:0

appl_param_nof_ports_per_modid=64
xflow_macsec_secure_chan_to_num_secure_assoc_encrypt=2
xflow_macsec_secure_chan_to_num_secure_assoc_decrypt=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
40000 300m 1280 2560 69632 0 1280
100000 300m 1280 2560 110592 0 1280
400000 300m 1280 2560 315392 0 1280
40000 1000m 1280 2560 114688 0 1280
100000 1000m 1280 2560 225280 0 1280
400000 1000m 1280 2560 778240 0 1280
40000 2000m 1280 2560 184320 0 1280
100000 2000m 1280 2560 393216 0 1280
400000 2000m 1280 2560 1445888 0 1280
40000 80000m 1280 2560 5369856 0 1280
100000 80000m 1280 2560 13357056 0 1280
400000 80000m 1280 2560 53305344 0 1280
40000 120000m 1280 2560 8028160 0 1280
100000 120000m 1280 2560 20004864 0 1280
400000 120000m 1280 2560 79900672 0 1280
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Ethernet112 24,25,26,27 Ethernet15/1 15 Ext 100000 Eth1
Ethernet120 16,17,18,19 Ethernet16/1 16 Ext 100000 Eth120-ASIC0 0 16 8
Ethernet128 8,9,10,11 Ethernet17/1 17 Ext 100000 Eth128-ASIC0 0 17 8
Ethernet136 0,1,2,3 Ethernet18/1 18 Ext 100000 Eth136-ASIC0 0 18 8
Ethernet-Rec0 221 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet-Rec0 249 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 49 8
Ethernet-IB0 250 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 50 8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{%- include 'qos_config.j2' %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{%- set default_topo = 't2' %}
{%- include 'buffers_config.j2' %}
Loading

0 comments on commit 43eda20

Please sign in to comment.