diff --git a/.azure-pipelines/docker-sonic-mgmt.yml b/.azure-pipelines/docker-sonic-mgmt.yml new file mode 100644 index 00000000000..4dc9aee9bb8 --- /dev/null +++ b/.azure-pipelines/docker-sonic-mgmt.yml @@ -0,0 +1,57 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml +# Build and push sonic-mgmt image + +schedules: +- cron: "0 8 * * *" + branches: + include: + - master + always: true + +trigger: none +pr: + branches: + include: + - master + paths: + include: + - dockers/docker-sonic-mgmt + +parameters: +- name: registry_url + type: string + default: sonicdev-microsoft.azurecr.io +- name: registry_conn + type: string + default: sonicdev + +stages: +- stage: Build + jobs: + - job: Build + pool: sonicbld + timeoutInMinutes: 360 + steps: + - template: cleanup.yml + - checkout: self + clean: true + submodules: recursive + - bash: | + set -xe + make configure PLATFORM=generic + make target/docker-sonic-mgmt.gz + docker load -i target/docker-sonic-mgmt.gz + docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest + env: + REGISTRY_SERVER: ${{ parameters.registry_url }} + displayName: Build docker-sonic-mgmt.gz + - task: Docker@2 + displayName: Upload image + inputs: + containerRegistry: ${{ parameters.registry_conn }} + repository: docker-sonic-mgmt + command: push + tags: latest diff --git a/.azure-pipelines/docker-sonic-slave.yml b/.azure-pipelines/docker-sonic-slave.yml new file mode 100644 index 00000000000..1da5f4c911e --- /dev/null +++ b/.azure-pipelines/docker-sonic-slave.yml @@ -0,0 +1,106 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml +# Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64 + +schedules: +- cron: "0 8 * * *" + branches: + include: + - master + always: true + +trigger: none +pr: + branches: + include: + - master + paths: + include: + - sonic-slave-jessie + - sonic-slave-stretch + - sonic-slave-buster + +parameters: +- name: 'arches' + type: object + default: + - amd64 + - armhf + - arm64 +- name: 'dists' + type: object + default: + - buster + - stretch + - jessie +- name: registry_url + type: string + default: sonicdev-microsoft.azurecr.io +- name: registry_conn + type: string + default: sonicdev + +stages: +- stage: Build + jobs: + - ${{ each dist in parameters.dists }}: + - ${{ if endswith(variables['Build.DefinitionName'], dist) }}: + - ${{ each arch in parameters.arches }}: + - job: Build_${{ dist }}_${{ arch }} + timeoutInMinutes: 360 + pool: sonicbld + steps: + - template: cleanup.yml + - checkout: self + clean: true + submodules: recursive + - bash: | + set -ex + + containers=$(docker container ls | grep "sonic-slave" | awk '{ print $1 }') + if [ ! -z "$containers" ]; then + docker container kill $containers || true + sleep 5 + fi + images=$(docker images 'sonic-slave-*' -a -q) + if [ ! -z "$images" ]; then + docker rmi -f $images + fi + + SLAVE_DIR=sonic-slave-${{ dist }} + if [ x${{ arch }} == x"amd64" ]; then + SLAVE_BASE_IMAGE=${SLAVE_DIR} + else + SLAVE_BASE_IMAGE=${SLAVE_DIR}-march-${{ arch }} + fi + + tmpfile=$(mktemp) + + echo ${{ arch }} > .arch + + DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker BLDENV=${{ dist }} make -f Makefile.work sonic-slave-build | tee $tmpfile + SLAVE_BASE_TAG=$(grep "^Checking sonic-slave-base image:" $tmpfile | awk -F ':' '{print $3}') + SLAVE_TAG=$(grep "^Checking sonic-slave image:" $tmpfile | awk -F ':' '{print $3}') + + mkdir -p target + + docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_BASE_IMAGE:latest + docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG + set +x + echo "##vso[task.setvariable variable=VARIABLE_SLAVE_BASE_IMAGE]$SLAVE_BASE_IMAGE" + echo "##vso[task.setvariable variable=VARIABLE_SLAVE_BASE_TAG]$SLAVE_BASE_TAG" + env: + REGISTRY_SERVER: ${{ parameters.registry_url }} + displayName: Build sonic-slave-${{ dist }}-${{ arch }} + + - task: Docker@2 + displayName: Upload image + inputs: + containerRegistry: ${{ parameters.registry_conn }} + repository: $(VARIABLE_SLAVE_BASE_IMAGE) + command: push + tags: | + $(VARIABLE_SLAVE_BASE_TAG) + latest diff --git a/.azure-pipelines/dpkg-cache-cleanup.yml b/.azure-pipelines/dpkg-cache-cleanup.yml new file mode 100644 index 00000000000..2789d181881 --- /dev/null +++ b/.azure-pipelines/dpkg-cache-cleanup.yml @@ -0,0 +1,27 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml +# Clean up the cache 30 days ago + +schedules: +- cron: "0 0 * * *" + branches: + include: + - master + always: true + +trigger: none +pr: none + +jobs: +- job: Build + pool: sonicbld + timeoutInMinutes: 5 + steps: + - checkout: none + - script: | + set -xe + sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete + displayName: clean dpkg cache + diff --git a/Makefile.work b/Makefile.work index 591ea051d98..6577e5aebbb 100644 --- a/Makefile.work +++ b/Makefile.work @@ -99,6 +99,11 @@ else SLAVE_DIR = sonic-slave-jessie endif +# Define a do-nothing target for rules/config.user so that when +# the file is missing, make won't try to rebuld everything. +rules/config.user: + @echo -n "" + include rules/config -include rules/config.user diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers.json.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers.json.j2 new file mode 100644 index 00000000000..1083a6210fc --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers.json.j2 @@ -0,0 +1,2 @@ +{%- set default_topo = 't0' %} +{%- include 'buffers_config.j2' %} diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t0.j2 new file mode 100644 index 00000000000..f5b7327e705 --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t0.j2 @@ -0,0 +1,46 @@ +{%- set default_cable = '300m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,32) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "32712448", + "type": "ingress", + "mode": "dynamic", + "xoff": "1622016" + }, + "egress_lossy_pool": { + "size": "24709632", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "32599040", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "static_th":"32599040" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1792", + "dynamic_th":"-1" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini new file mode 100644 index 00000000000..e30c3aeae2e --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini @@ -0,0 +1,8 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold xon_offset + 50000 5m 4608 4608 33792 -3 4608 + 100000 5m 4608 4608 49408 -3 4608 + 50000 40m 4608 4608 36352 -3 4608 + 100000 40m 4608 4608 54528 -3 4608 + 50000 300m 4608 4608 55296 -3 4608 + 100000 300m 4608 4608 92672 -3 4608 diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/qos.json.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/qos.json.j2 new file mode 100644 index 00000000000..3e548325ea3 --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/qos.json.j2 @@ -0,0 +1 @@ +{%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm index 5536bda517d..c93de285953 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm @@ -48,6 +48,11 @@ robust_hash_disable_vlan=1 stable_size=0x5500000 tdma_timeout_usec=15000000 tslam_timeout_usec=15000000 +sai_optimized_mmu=1 +mmu_init_config="TD3-MSFT-T0-100G" +buf.map.egress_pool0.ingress_pool=0 +buf.map.egress_pool1.ingress_pool=0 +buf.map.egress_pool2.ingress_pool=1 phy_chain_rx_lane_map_physical{1.0}=0x1302 phy_chain_rx_lane_map_physical{101.0}=0x0213 phy_chain_rx_lane_map_physical{105.0}=0x2031 @@ -509,4 +514,4 @@ serdes_preemphasis_119=0x14410a serdes_preemphasis_123=0x14410a serdes_preemphasis_127=0x14410a serdes_driver_current_130=0xe -serdes_preemphasis_130=0x102804 +serdes_preemphasis_130=0x102804 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers.json.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers.json.j2 new file mode 100644 index 00000000000..1083a6210fc --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers.json.j2 @@ -0,0 +1,2 @@ +{%- set default_topo = 't0' %} +{%- include 'buffers_config.j2' %} diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers_defaults_t0.j2 new file mode 100644 index 00000000000..e4d43cf75c2 --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers_defaults_t0.j2 @@ -0,0 +1,47 @@ + +{%- set default_cable = '300m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,32) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "32669440", + "type": "ingress", + "mode": "dynamic", + "xoff": "2058240" + }, + "egress_lossy_pool": { + "size": "24192256", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "32340992", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "static_th":"32340992" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1792", + "dynamic_th":"-1" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini new file mode 100644 index 00000000000..44880400d0f --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini @@ -0,0 +1,8 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold xon_offset + 50000 5m 4608 4608 79872 -3 4608 + 100000 5m 4608 4608 54528 -3 4608 + 50000 40m 4608 4608 39936 -3 4608 + 100000 40m 4608 4608 60416 -3 4608 + 50000 300m 4608 4608 61440 -3 4608 + 100000 300m 4608 4608 103680 -3 4608 diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 new file mode 100644 index 00000000000..3e548325ea3 --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 @@ -0,0 +1 @@ +{%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm index 5ec69f685eb..1204e2dcb6a 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm @@ -48,6 +48,11 @@ robust_hash_disable_vlan=1 stable_size=0x5500000 tdma_timeout_usec=15000000 tslam_timeout_usec=15000000 +sai_optimized_mmu=1 +mmu_init_config="TD3-MSFT-T0-50G" +buf.map.egress_pool0.ingress_pool=0 +buf.map.egress_pool1.ingress_pool=0 +buf.map.egress_pool2.ingress_pool=1 phy_chain_rx_lane_map_physical{1.0}=0x1302 phy_chain_rx_lane_map_physical{5.0}=0x3120 phy_chain_rx_lane_map_physical{9.0}=0x3120 diff --git a/dockers/docker-orchagent/ndppd.conf.j2 b/dockers/docker-orchagent/ndppd.conf.j2 index bc375f3c498..dbb70734680 100644 --- a/dockers/docker-orchagent/ndppd.conf.j2 +++ b/dockers/docker-orchagent/ndppd.conf.j2 @@ -21,7 +21,7 @@ {% set _x = proxy_interfaces[intf].append(prefix) %} {% endif %} {% endfor -%} - +route-ttl 2147483647 {% for intf, prefix_list in proxy_interfaces.items() %} {% if prefix_list %} diff --git a/src/sonic-config-engine/tests/sample_output/py2/ndppd.conf b/src/sonic-config-engine/tests/sample_output/py2/ndppd.conf index 71ff1dfaf9c..edae81fffdb 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/ndppd.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/ndppd.conf @@ -4,6 +4,7 @@ # # Config file for ndppd, the NDP Proxy Daemon # See man page for ndppd.conf.5 for descriptions of all available options +route-ttl 2147483647 proxy Vlan1000 { rule fc02:1000::/64 { diff --git a/src/sonic-config-engine/tests/sample_output/py3/ndppd.conf b/src/sonic-config-engine/tests/sample_output/py3/ndppd.conf index 28a239006d2..66117155cdb 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/ndppd.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/ndppd.conf @@ -4,6 +4,7 @@ # # Config file for ndppd, the NDP Proxy Daemon # See man page for ndppd.conf.5 for descriptions of all available options +route-ttl 2147483647 proxy Vlan1000 { rule fc01:1000::/64 { diff --git a/src/sonic-device-data/tests/permitted_list b/src/sonic-device-data/tests/permitted_list index 997250cbf6b..f152140e907 100644 --- a/src/sonic-device-data/tests/permitted_list +++ b/src/sonic-device-data/tests/permitted_list @@ -230,3 +230,7 @@ pbmp_gport_stack reglist_enable scache_filename host_as_route_disable +sai_optimized_mmu +buf.map.egress_pool0.ingress_pool +buf.map.egress_pool1.ingress_pool +buf.map.egress_pool2.ingress_pool diff --git a/src/sonic-utilities b/src/sonic-utilities index 9dba93fd961..08337aa7637 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 9dba93fd96194d70ee181ed48f439bc4f3c00b82 +Subproject commit 08337aa7637b290bb8407c38b2a5dbe3e8383b3e