Skip to content

Commit

Permalink
Merge branch 'sonic-net:master' into bgp-supervisord-warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh352 authored Dec 3, 2024
2 parents d25140f + 961cdc0 commit df36021
Show file tree
Hide file tree
Showing 76 changed files with 586 additions and 6,136 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
variables:
dbg_image: yes

- name: innovium
- name: marvell-teralynx
variables:
dbg_image: yes

Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/template-variables.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io'
COMMON_LIB_BUILD_ENVS: 'bullseye'
COMMON_LIB_BUILD_ENVS: 'bookworm'
SONIC_SLAVE_DOCKER_DRIVER: 'overlay2'
SONIC_BUILD_RETRY_COUNT: 3
SONIC_BUILD_RETRY_INTERVAL: 600
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Broadcom](https://dev.azure.com/mssonic/build/_apis/build/status/broadcom/Azure.sonic-buildimage.official.broadcom?branchName=master&label=Broadcom)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=138&branchName=master)
[![Centec](https://dev.azure.com/mssonic/build/_apis/build/status/centec/Azure.sonic-buildimage.official.centec?branchName=master&label=Centec)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=143&branchName=master)
[![Centec(arm64)](https://dev.azure.com/mssonic/build/_apis/build/status/centec/Azure.sonic-buildimage.official.centec-arm64?branchName=master&label=Centec-arm64)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=140&branchName=master)
[![Marvell-Teralynx](https://dev.azure.com/mssonic/build/_apis/build/status/marvell-teralynx/Azure.sonic-buildimage.official.innovium?branchName=master&label=Marvell-Teralynx)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=148&branchName=master)
[![Marvell-Teralynx](https://dev.azure.com/mssonic/build/_apis/build/status/marvell-teralynx/Azure.sonic-buildimage.official.marvell-teralynx?branchName=master&label=Marvell-Teralynx)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=148&branchName=master)
[![Mellanox](https://dev.azure.com/mssonic/build/_apis/build/status/mellanox/Azure.sonic-buildimage.official.mellanox?branchName=master&label=Mellanox)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=139&branchName=master)
[![Marvell(armhf)](https://dev.azure.com/mssonic/build/_apis/build/status/marvell/Azure.sonic-buildimage.official.marvell-armhf?branchName=master&label=Marvell-armhf)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=141&branchName=master)
[![Marvell(arm64)](https://dev.azure.com/mssonic/build/_apis/build/status/marvell/Azure.sonic-buildimage.official.marvell-arm64?branchName=master&label=Marvell-arm64)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=999&branchName=master)
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ stages:
- name: broadcom
variables:
swi_image: yes
docker_syncd_rpc_image: yes
platform_rpc: brcm
INCLUDE_RESTAPI: y
- name: mellanox
variables:
Expand Down
2 changes: 1 addition & 1 deletion files/build_templates/buffers_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def
"LOSSLESS_TRAFFIC_PATTERN": {
"AZURE": {
"mtu": "1024",
"small_packet_percentage": "100"
"small_packet_percentage": "50"
}
}
{% endif %}
Expand Down
5 changes: 5 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,12 @@ sudo cp {{platform_api_py3_wheel_path}} $FILESYSTEM_ROOT/$SONIC_PLATFORM_PY3_WHE
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install $SONIC_PLATFORM_PY3_WHEEL_NAME
sudo rm -rf $FILESYSTEM_ROOT/$SONIC_PLATFORM_PY3_WHEEL_NAME


sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/libdashapi_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f

sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install xmlstarlet

{% endif %}

{%- if SONIC_ROUTING_STACK == "frr" %}
Expand Down
3 changes: 2 additions & 1 deletion platform/broadcom/docker-syncd-brcm-dnx-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
DOCKER_SYNCD_BRCM_DNX_RPC = docker-syncd-brcm-dnx-rpc.gz
DOCKER_SYNCD_DNX_BASE = docker-syncd-brcm-dnx.gz
$(DOCKER_SYNCD_BRCM_DNX_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm-dnx-rpc
$(DOCKER_SYNCD_BRCM_DNX_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(PTF)
$(DOCKER_SYNCD_BRCM_DNX_RPC)_DEPENDS += $(SYNCD_RPC)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_BRCM_DNX_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_BRCM_DNX_RPC)_PYTHON_WHEELS += $(PTF_PY3)
$(DOCKER_SYNCD_BRCM_DNX_RPC)_FILES += $(DSSERVE) $(BCMCMD) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_BRCM_DNX_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_DNX_BASE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_DNX_RPC)
Expand Down
79 changes: 46 additions & 33 deletions platform/broadcom/docker-syncd-brcm-dnx-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,58 +1,71 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-syncd-brcm-dnx-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

COPY \
{% for deb in docker_syncd_brcm_dnx_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN apt-get purge -y syncd

## Pre-install the fundamental packages
RUN apt-get update \
&& apt-get -y install \
net-tools \
python3-pip \
python-setuptools \
python3-pip \
python3-dev \
python-is-python3 \
python3-scapy \
build-essential \
libssl-dev \
libffi-dev \
python-dev \
wget \
cmake \
libqt5core5a \
libqt5network5 \
libboost-atomic1.74.0

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_brcm_dnx_rpc_debs.split(' ') -%}
dpkg_apt debs/{{ deb }}{{'; '}}
{%- endfor %}

RUN wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
&& tar xvfz 1.0.0.tar.gz \
&& cd nanomsg-1.0.0 \
&& mkdir -p build \
&& cmake . \
&& make install \
&& ldconfig \
&& cd .. \
&& rm -fr nanomsg-1.0.0 \
&& rm -f 1.0.0.tar.gz \
&& pip2 install cffi==1.7.0 \
&& pip2 install --upgrade cffi==1.7.0 \
&& pip2 install wheel \
&& pip2 install nnpy \
libnanomsg5 \
libnanomsg-dev

{% if docker_syncd_brcm_dnx_rpc_debs.strip() -%}
# Copy locally-built Debian package dependencies
{{ copy_files("debs/", docker_syncd_brcm_dnx_rpc_debs.split(' '), "/debs/") }}
{% endif %}

{% if docker_syncd_brcm_dnx_rpc_pydebs.strip() -%}
# Copy locally-built Debian package dependencies
{{ copy_files("python-debs/", docker_syncd_brcm_dnx_rpc_pydebs.split(' '), "/debs/") }}
{% endif %}

{% if docker_syncd_brcm_dnx_rpc_debs.strip() -%}
# Install locally-built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_syncd_brcm_dnx_rpc_debs.split(' ')) }}
{% endif %}

{% if docker_syncd_brcm_dnx_rpc_pydebs.strip() -%}
# Install locally-built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_syncd_brcm_dnx_rpc_pydebs.split(' ')) }}
{% endif %}

RUN pip3 install cffi==1.16.0 \
&& pip3 install wheel \
&& pip3 install nnpy \
&& mkdir -p /opt \
&& cd /opt \
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
&& mkdir ptf && cd ptf && wget https://raw.githubusercontent.com/p4lang/ptf/master/src/ptf/afpacket.py && touch __init__.py \
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
&& rm -rf /root/deps

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

## Clean up
RUN apt-get -y purge \
cmake \
libssl-dev \
libffi-dev \
python3-dev \
python3-pip \
libthrift-dev \
build-essential

RUN apt-get clean -y && \
apt-get autoclean -y && \
apt-get autoremove -y && \
rm -rf /debs

ENTRYPOINT ["/usr/local/bin/supervisord"]
3 changes: 2 additions & 1 deletion platform/broadcom/docker-syncd-brcm-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

DOCKER_SYNCD_BRCM_RPC = docker-syncd-brcm-rpc.gz
$(DOCKER_SYNCD_BRCM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm-rpc
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(PTF)
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_BRCM_RPC)_PYTHON_WHEELS += $(PTF_PY3)
$(DOCKER_SYNCD_BRCM_RPC)_FILES += $(DSSERVE) $(BCMCMD) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_BRCM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BASE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)
Expand Down
78 changes: 46 additions & 32 deletions platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,51 +1,50 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-syncd-brcm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

COPY \
{% for deb in docker_syncd_brcm_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN apt-get purge -y syncd

## Pre-install the fundamental packages
RUN apt-get update \
&& apt-get -y install \
net-tools \
python3-pip \
python-setuptools \
python3-pip \
python3-dev \
python-is-python3 \
python3-scapy \
build-essential \
libssl-dev \
libffi-dev \
python-dev \
wget \
cmake \
libqt5core5a \
libqt5network5 \
libboost-atomic1.74.0

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_brcm_rpc_debs.split(' ') -%}
dpkg_apt debs/{{ deb }}{{'; '}}
{%- endfor %}

RUN wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
&& tar xvfz 1.0.0.tar.gz \
&& cd nanomsg-1.0.0 \
&& mkdir -p build \
&& cmake . \
&& make install \
&& ldconfig \
&& cd .. \
&& rm -fr nanomsg-1.0.0 \
&& rm -f 1.0.0.tar.gz \
&& pip2 install cffi==1.7.0 \
&& pip2 install --upgrade cffi==1.7.0 \
&& pip2 install wheel \
&& pip2 install nnpy \
libnanomsg5 \
libnanomsg-dev

{% if docker_syncd_brcm_rpc_debs.strip() -%}
# Copy locally-built Debian package dependencies
{{ copy_files("debs/", docker_syncd_brcm_rpc_debs.split(' '), "/debs/") }}
{% endif %}

{% if docker_syncd_brcm_rpc_pydebs.strip() -%}
# Copy locally-built Debian package dependencies
{{ copy_files("python-debs/", docker_syncd_brcm_rpc_pydebs.split(' '), "/debs/") }}
{% endif %}

{% if docker_syncd_brcm_rpc_debs.strip() -%}
# Install locally-built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_syncd_brcm_rpc_debs.split(' ')) }}
{% endif %}

{% if docker_syncd_brcm_rpc_pydebs.strip() -%}
# Install locally-built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_syncd_brcm_rpc_pydebs.split(' ')) }}
{% endif %}

RUN pip3 install cffi==1.16.0 \
&& pip3 install wheel \
&& pip3 install nnpy \
&& mkdir -p /opt \
&& cd /opt \
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
Expand All @@ -54,4 +53,19 @@ RUN wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

## Clean up
RUN apt-get -y purge \
cmake \
libssl-dev \
libffi-dev \
python3-dev \
python3-pip \
libthrift-dev \
build-essential

RUN apt-get clean -y && \
apt-get autoclean -y && \
apt-get autoremove -y && \
rm -rf /debs

ENTRYPOINT ["/usr/local/bin/supervisord"]
6 changes: 0 additions & 6 deletions platform/broadcom/libsaithrift-dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@ SAI_VER = 0.9.4

LIBSAITHRIFT_DEV = libsaithrift$(SAITHRIFT_VER)-dev_$(SAI_VER)_amd64.deb
$(LIBSAITHRIFT_DEV)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
#Support two different versions of thrift
ifeq ($(SAITHRIFT_V2),y)
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT_0_14_1) $(LIBTHRIFT_0_14_1_DEV) $(PYTHON3_THRIFT_0_14_1) $(THRIFT_0_14_1_COMPILER)
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT_0_14_1)
$(LIBSAITHRIFT_DEV)_BUILD_ENV = SAITHRIFTV2=true SAITHRIFT_VER=v2
else
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(PYTHON_THRIFT) $(THRIFT_COMPILER)
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT)
endif
$(LIBSAITHRIFT_DEV)_DEPENDS += $(BRCM_XGS_SAI) $(BRCM_XGS_SAI_DEV)
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(BRCM_XGS_SAI)
Expand Down
2 changes: 2 additions & 0 deletions platform/broadcom/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,7 @@ $(SYNCD)_DEPENDS += $(BRCM_XGS_SAI) $(BRCM_XGS_SAI_DEV)
$(SYNCD)_UNINSTALLS += $(BRCM_XGS_SAI_DEV) $(BRCM_XGS_SAI)

ifeq ($(ENABLE_SYNCD_RPC),y)
# Remove the libthrift_0.11.0 dependency injected by rules/syncd.mk
$(SYNCD)_DEPENDS := $(filter-out $(LIBTHRIFT_DEV),$($(SYNCD)_DEPENDS))
$(SYNCD)_DEPENDS += $(LIBSAITHRIFT_DEV)
endif
2 changes: 1 addition & 1 deletion platform/mellanox/mlnx-sai.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mellanox SAI

MLNX_SAI_VERSION = SAIBuild2405.30.0.0
MLNX_SAI_VERSION = SAIBuild2405.30.0.1
MLNX_SAI_ASSETS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins
MLNX_SAI_ASSETS_RELEASE_TAG = sai-$(MLNX_SAI_VERSION)-$(BLDENV)-$(CONFIGURED_ARCH)
MLNX_SAI_ASSETS_URL = $(MLNX_SAI_ASSETS_GITHUB_URL)/releases/download/$(MLNX_SAI_ASSETS_RELEASE_TAG)
Expand Down
4 changes: 3 additions & 1 deletion platform/vs/docker-gbsyncd-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
DOCKER_GBSYNCD_PLATFORM_CODE = vs
include $(PLATFORM_PATH)/../template/docker-gbsyncd-bookworm.mk

$(DOCKER_GBSYNCD_BASE)_DEPENDS += $(SYNCD_VS)
$(DOCKER_GBSYNCD_BASE)_DEPENDS += $(SYNCD_VS) \
$(LIBNL3_DEV) \
$(LIBNL3)

$(DOCKER_GBSYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \
$(LIBSWSSCOMMON_DBG) \
Expand Down
4 changes: 2 additions & 2 deletions platform/vs/docker-gbsyncd-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN apt-get install -f -y iproute2 libcap2-bin

# For DASH engine

COPY debs/libnl-3-dev_3.5.0-1_amd64.deb debs/libnl-route-3-dev_3.5.0-1_amd64.deb debs/
RUN dpkg -i debs/libnl-3-dev_3.5.0-1_amd64.deb debs/libnl-route-3-dev_3.5.0-1_amd64.deb
COPY debs/libnl-3-dev_{{ LIBNL3_VERSION_SONIC }}_{{ CONFIGURED_ARCH }}.deb debs/libnl-route-3-dev_{{ LIBNL3_VERSION_SONIC }}_{{ CONFIGURED_ARCH }}.deb debs/
RUN dpkg -i debs/libnl-3-dev_{{ LIBNL3_VERSION_SONIC }}_{{ CONFIGURED_ARCH }}.deb debs/libnl-route-3-dev_{{ LIBNL3_VERSION_SONIC }}_{{ CONFIGURED_ARCH }}.deb

RUN apt-get install -f -y libabsl20220623 libc-ares2 python3-six libboost-thread1.74.0 libboost-dev libboost-system-dev libboost-thread-dev libboost-filesystem1.74.0 libboost-program-options1.74.0 libboost-thread1.74.0 libnanomsg5 libpcap0.8 libthrift-0.17.0 libboost-dev libboost-filesystem-dev libboost-program-options-dev libgmp-dev libnanomsg-dev libpcap-dev libtool pkg-config libthrift-dev python3-thrift thrift-compiler libboost-iostreams1.74.0 libgc1 cpp libboost-dev libboost-all-dev libboost-graph-dev libboost-iostreams-dev libfl-dev libgc-dev libgmp-dev libbpf-dev tcpdump libelf-dev llvm clang python3-pyroute2 python3-ply python3-scapy python3-setuptools python3-thrift libthrift-0.17.0 libgrpc++1.51 libgrpc29 libprotobuf32 libboost-dev libboost-system-dev libboost-thread-dev libprotoc-dev protobuf-compiler python3-protobuf libgrpc++-dev libgrpc-dev protobuf-compiler-grpc python3-grpcio

Expand Down
4 changes: 2 additions & 2 deletions platform/vs/docker-sonic-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $(DOCKER_SONIC_VS)_FILES += $(CONFIGDB_LOAD_SCRIPT) \
$(UPDATE_CHASSISDB_CONFIG_SCRIPT) \
$(COPP_CONFIG_TEMPLATE)

$(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BULLSEYE)
$(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BOOKWORM)
SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_VS)

SONIC_BULLSEYE_DOCKERS += $(DOCKER_SONIC_VS)
SONIC_BOOKWORM_DOCKERS += $(DOCKER_SONIC_VS)
Loading

0 comments on commit df36021

Please sign in to comment.