Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .azure-pipelines/docker-sonic-mgmt.yml
Original file line number Diff line number Diff line change
@@ -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
106 changes: 106 additions & 0 deletions .azure-pipelines/docker-sonic-slave.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions .azure-pipelines/dpkg-cache-cleanup.yml
Original file line number Diff line number Diff line change
@@ -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

5 changes: 5 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{%- set default_topo = 't0' %}
{%- include 'buffers_config.j2' %}
Original file line number Diff line number Diff line change
@@ -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 %}
Original file line number Diff line number Diff line change
@@ -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
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
Expand Up @@ -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
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{%- set default_topo = 't0' %}
{%- include 'buffers_config.j2' %}
Original file line number Diff line number Diff line change
@@ -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 %}
Original file line number Diff line number Diff line change
@@ -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
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
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-orchagent/ndppd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand Down
1 change: 1 addition & 0 deletions src/sonic-config-engine/tests/sample_output/py2/ndppd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/sonic-config-engine/tests/sample_output/py3/ndppd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions src/sonic-device-data/tests/permitted_list
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/sonic-utilities