Skip to content

Commit

Permalink
Merge remote-tracking branch 'upsteam/master' into chassis-packet
Browse files Browse the repository at this point in the history
  • Loading branch information
abdosi committed Oct 28, 2021
2 parents 6e2fecf + 51c9c98 commit 7e1d4ef
Show file tree
Hide file tree
Showing 636 changed files with 49,214 additions and 4,006 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
platform_rpc: centec

- name: centec-arm64
pool: sonicbld_8c
pool: sonicbld-arm64
timeoutInMinutes: 2880
variables:
PLATFORM_ARCH: arm64
Expand All @@ -78,7 +78,7 @@ jobs:
dbg_image: yes

- name: marvell-armhf
pool: sonicbld_8c
pool: sonicbld-armhf
timeoutInMinutes: 2880
variables:
PLATFORM_ARCH: armhf
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/official-build-cisco-8000.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ stages:
path: s/platform/cisco-8000
displayName: 'Checkout cisco-8000'
- script: |
cisco_ref=(cat platform/checkout/cisco-8000.ini | grep '^ref=' | cut -d= -f2)
cisco_ref=$(cat platform/checkout/cisco-8000.ini | grep '^ref=' | cut -d= -f2)
echo "The cisco 8000 release version is $cisco_ref"
echo "##vso[task.setvariable variable=cisco.ref]$cisco_ref"
displayName: 'Export cisco release version'
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ dockers/**/buildinfo
platform/**/buildinfo
sonic-slave*/**/buildinfo

# pytest coverage files
.coverage
coverage.xml
test-results.xml
htmlcov/

# Dev tools
.vscode/
.idea/

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,6 @@
[submodule "platform/broadcom/sonic-platform-modules-nokia"]
path = platform/broadcom/sonic-platform-modules-nokia
url = https://github.com/nokia/sonic-platform.git
[submodule "src/linkmgrd"]
path = src/linkmgrd
url = https://github.com/Azure/sonic-linkmgrd.git
5 changes: 4 additions & 1 deletion Makefile.cache
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ define GET_MOD_DEP_SHA
$(eval $(1)_DEP_FILES_MISSING := $(filter-out $(wildcard $($(1)_DEP_MOD_SHA_FILES)),$($(1)_DEP_MOD_SHA_FILES)) )
$(if $($(1)_DEP_FILES_MISSING), $(warning "[ DPKG ] Dependecy file(s) are not found for $(1) : $($(1)_DEP_FILES_MISSING)))

$(eval $(1)_DEP_MOD_SHA := $(shell git hash-object $($(1)_DEP_MOD_SHA_FILES) \
# Include package dependencies hash values into package hash calculation
$(eval $(1)_DEP_PKGS_SHA := $(foreach dfile,$(1)_MOD_DEP_PKGS,$(dfile)_DEP_MOD_SHA $(dfile)_MOD_HASH))

$(eval $(1)_DEP_MOD_SHA := $(shell bash -c "git hash-object $($(1)_DEP_MOD_SHA_FILES) && echo $($(1)_DEP_PKGS_SHA)" \
| sha1sum | awk '{print substr($$1,0,23);}'))
endef

Expand Down
2 changes: 2 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# * ENABLE_ZTP: Enables zero touch provisioning.
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
# * INCLUDE_KUBERNETES: Allows including Kubernetes
# * INCLUDE_MUX: Include MUX feature/services for TOR switch.
# * ENABLE_PFCWD_ON_START: Enable PFC Watchdog (PFCWD) on server-facing ports
# * by default for TOR switch.
# * ENABLE_SYNCD_RPC: Enables rpc-based syncd builds.
Expand Down Expand Up @@ -274,6 +275,7 @@ SONIC_BUILD_INSTRUCTION := make \
SONIC_INCLUDE_SYSTEM_TELEMETRY=$(INCLUDE_SYSTEM_TELEMETRY) \
INCLUDE_DHCP_RELAY=$(INCLUDE_DHCP_RELAY) \
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
SONIC_INCLUDE_MUX=$(INCLUDE_MUX) \
TELEMETRY_WRITABLE=$(TELEMETRY_WRITABLE) \
EXTRA_DOCKER_TARGETS=$(EXTRA_DOCKER_TARGETS) \
BUILD_LOG_TIMESTAMP=$(BUILD_LOG_TIMESTAMP) \
Expand Down
2 changes: 2 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
python3-distutils \
python3-pip \
cron \
libprotobuf17 \
libgrpc++ \
haveged \
jq

Expand Down
26 changes: 26 additions & 0 deletions build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,30 @@ generate_onie_installer_image()
$ONIE_INSTALLER_PAYLOAD
}

# Generate asic-specific device list
generate_device_list()
{
local platforms_asic=$1

# Create an empty function, and later append to it
echo -n > $platforms_asic

for d in `find -L ./device -maxdepth 2 -mindepth 2 -type d`; do
if [ -f $d/platform_asic ]; then
if [ "$CONFIGURED_PLATFORM" = "generic" ] || grep -Fxq "$CONFIGURED_PLATFORM" $d/platform_asic; then
echo "${d##*/}" >> "$platforms_asic";
fi;
fi;
done
}

if [ "$IMAGE_TYPE" = "onie" ]; then
echo "Build ONIE installer"
mkdir -p `dirname $OUTPUT_ONIE_IMAGE`
sudo rm -f $OUTPUT_ONIE_IMAGE

generate_device_list "./installer/$TARGET_PLATFORM/platforms_asic"

generate_onie_installer_image

## Build a raw partition dump image using the ONIE installer that can be
Expand All @@ -103,6 +122,8 @@ elif [ "$IMAGE_TYPE" = "raw" ]; then
mkdir -p `dirname $OUTPUT_RAW_IMAGE`
sudo rm -f $OUTPUT_RAW_IMAGE

generate_device_list "./installer/$TARGET_PLATFORM/platforms_asic"

generate_onie_installer_image

echo "Creating SONiC raw partition : $OUTPUT_RAW_IMAGE of size $RAW_IMAGE_DISK_SIZE MB"
Expand Down Expand Up @@ -134,6 +155,8 @@ elif [ "$IMAGE_TYPE" = "raw" ]; then

elif [ "$IMAGE_TYPE" = "kvm" ]; then

generate_device_list "./installer/$TARGET_PLATFORM/platforms_asic"

generate_onie_installer_image
# Generate single asic KVM image
generate_kvm_image
Expand Down Expand Up @@ -170,6 +193,9 @@ elif [ "$IMAGE_TYPE" = "aboot" ]; then
zip -g $ABOOT_BOOT_IMAGE version
rm version

generate_device_list ".platforms_asic"
zip -g $OUTPUT_ABOOT_IMAGE .platforms_asic

zip -g $OUTPUT_ABOOT_IMAGE $ABOOT_BOOT_IMAGE
rm $ABOOT_BOOT_IMAGE
if [ "$SONIC_ENABLE_IMAGE_SIGNATURE" = "y" ]; then
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,47 @@

{%- set default_cable = '40m' %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"egress_lossy_pool": {
"size": "67108864",
"type": "egress",
"mode": "dynamic"
},
"ingress_lossless_pool": {
"mode": "dynamic",
"size": "59001152",
"xoff": "7428992",
"type": "ingress"
}
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"static_th":"67108864"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"0",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
}
},
{%- endmacro %}

{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}
}
{% endmacro %}

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

{%- set default_cable = '40m' %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"egress_lossy_pool": {
"size": "67108864",
"type": "egress",
"mode": "dynamic"
},
"ingress_lossless_pool": {
"mode": "dynamic",
"size": "59001152",
"xoff": "7428992",
"type": "ingress"
}
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"static_th":"67108864"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"0",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
}
},
{%- endmacro %}

{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}
}
{% endmacro %}

Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"interfaces": {
"Ethernet0": {
"default_brkout_mode": "1x400G"
},
"Ethernet8": {
"default_brkout_mode": "1x400G"
},
"Ethernet16": {
"default_brkout_mode": "1x400G"
},
"Ethernet24": {
"default_brkout_mode": "1x400G"
},
"Ethernet32": {
"default_brkout_mode": "1x400G"
},
"Ethernet40": {
"default_brkout_mode": "1x400G"
},
"Ethernet48": {
"default_brkout_mode": "1x400G"
},
"Ethernet56": {
"default_brkout_mode": "1x400G"
},
"Ethernet64": {
"default_brkout_mode": "1x400G"
},
"Ethernet72": {
"default_brkout_mode": "1x400G"
},
"Ethernet80": {
"default_brkout_mode": "1x400G"
},
"Ethernet88": {
"default_brkout_mode": "1x400G"
},
"Ethernet96": {
"default_brkout_mode": "1x400G"
},
"Ethernet104": {
"default_brkout_mode": "1x400G"
},
"Ethernet112": {
"default_brkout_mode": "1x400G"
},
"Ethernet120": {
"default_brkout_mode": "1x400G"
},
"Ethernet128": {
"default_brkout_mode": "1x400G"
},
"Ethernet136": {
"default_brkout_mode": "1x400G"
},
"Ethernet144": {
"default_brkout_mode": "1x400G"
},
"Ethernet152": {
"default_brkout_mode": "1x400G"
},
"Ethernet160": {
"default_brkout_mode": "1x400G"
},
"Ethernet168": {
"default_brkout_mode": "1x400G"
},
"Ethernet176": {
"default_brkout_mode": "1x400G"
},
"Ethernet184": {
"default_brkout_mode": "1x400G"
},
"Ethernet192": {
"default_brkout_mode": "1x400G"
},
"Ethernet200": {
"default_brkout_mode": "1x400G"
},
"Ethernet208": {
"default_brkout_mode": "1x400G"
},
"Ethernet216": {
"default_brkout_mode": "1x400G"
},
"Ethernet224": {
"default_brkout_mode": "1x400G"
},
"Ethernet232": {
"default_brkout_mode": "1x400G"
},
"Ethernet240": {
"default_brkout_mode": "1x400G"
},
"Ethernet248": {
"default_brkout_mode": "1x400G"
},
"Ethernet256": {
"default_brkout_mode": "1x10G"
},
"Ethernet257": {
"default_brkout_mode": "1x10G"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
10000 5m 1270 0 190500 -2 2540
25000 5m 1270 0 190500 -2 2540
40000 5m 1270 0 190500 -2 2540
50000 5m 1270 0 190500 -2 2540
100000 5m 1270 0 190500 -2 2540
200000 5m 1270 0 190500 -2 2540
400000 5m 1270 0 190500 -2 2540
10000 40m 1270 0 190500 -2 2540
25000 40m 1270 0 190500 -2 2540
40000 40m 1270 0 190500 -2 2540
50000 40m 1270 0 190500 -2 2540
100000 40m 1270 0 190500 -2 2540
200000 40m 1270 0 190500 -2 2540
400000 40m 1270 0 190500 -2 2540
10000 300m 1270 0 190500 -2 2540
25000 300m 1270 0 190500 -2 2540
40000 300m 1270 0 190500 -2 2540
50000 300m 1270 0 190500 -2 2540
100000 300m 1270 0 190500 -2 2540
200000 300m 1270 0 190500 -2 2540
400000 300m 1270 0 190500 -2 2540
Loading

0 comments on commit 7e1d4ef

Please sign in to comment.