From 06782a686c0f0eab29769ff6dacf171f2aab6b34 Mon Sep 17 00:00:00 2001 From: Mike Attig Date: Mon, 6 May 2024 11:26:30 -0700 Subject: [PATCH] Update P4RT docker to Bookworm Signed-off-by: mkeda --- dockers/docker-sonic-p4rt/Dockerfile.j2 | 2 +- rules/config | 2 +- rules/docker-p4rt.mk | 10 +++++----- src/sonic-p4rt/Makefile | 4 ++++ 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dockers/docker-sonic-p4rt/Dockerfile.j2 b/dockers/docker-sonic-p4rt/Dockerfile.j2 index 241f4724ea3f..994bc3a5e211 100644 --- a/dockers/docker-sonic-p4rt/Dockerfile.j2 +++ b/dockers/docker-sonic-p4rt/Dockerfile.j2 @@ -1,5 +1,5 @@ {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} +FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} ARG docker_container_name ARG git_commit diff --git a/rules/config b/rules/config index e52eeae4c410..68fab00ee7bc 100644 --- a/rules/config +++ b/rules/config @@ -153,7 +153,7 @@ INCLUDE_DHCP_RELAY = y INCLUDE_DHCP_SERVER ?= n # INCLUDE_P4RT - build docker-p4rt for P4RT support -INCLUDE_P4RT = n +INCLUDE_P4RT = y # ENABLE_AUTO_TECH_SUPPORT - Enable the configuration for event-driven techsupport & coredump mgmt feature ENABLE_AUTO_TECH_SUPPORT = y diff --git a/rules/docker-p4rt.mk b/rules/docker-p4rt.mk index bc8d6b9fbe82..85cfb67552c7 100644 --- a/rules/docker-p4rt.mk +++ b/rules/docker-p4rt.mk @@ -7,12 +7,12 @@ DOCKER_P4RT_DBG = $(DOCKER_P4RT_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_P4RT)_PATH = $(DOCKERS_PATH)/$(DOCKER_P4RT_STEM) $(DOCKER_P4RT)_DEPENDS += $(SONIC_P4RT) -$(DOCKER_P4RT)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) +$(DOCKER_P4RT)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS) $(DOCKER_P4RT)_DBG_DEPENDS += $(SONIC_P4RT_DBG) $(LIBSWSSCOMMON_DBG) $(DOCKER_P4RT)_DBG_DEPENDS += $(LIBSAIREDIS_DBG) -$(DOCKER_P4RT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) +$(DOCKER_P4RT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_IMAGE_PACKAGES) -$(DOCKER_P4RT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE) +$(DOCKER_P4RT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BOOKWORM) $(DOCKER_P4RT)_VERSION = 1.0.0 $(DOCKER_P4RT)_PACKAGE_NAME = p4rt @@ -21,9 +21,9 @@ $(DOCKER_P4RT)_FAST_SHUTDOWN_BEFORE = swss # TODO: Enable P4RT DBG SONIC_DOCKER_IMAGES += $(DOCKER_P4RT) -SONIC_BULLSEYE_DOCKERS += $(DOCKER_P4RT) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_P4RT) # SONIC_DOCKER_DBG_IMAGES += $(DOCKER_P4RT_DBG) -# SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_P4RT_DBG) +# SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_P4RT_DBG) ifeq ($(INCLUDE_P4RT), y) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_P4RT) diff --git a/src/sonic-p4rt/Makefile b/src/sonic-p4rt/Makefile index 191a94d45518..5eeb135e9222 100644 --- a/src/sonic-p4rt/Makefile +++ b/src/sonic-p4rt/Makefile @@ -11,6 +11,10 @@ BAZEL_BUILD_OPTS += --fission=yes --features=per_object_debug_info # Override sonic_swss_common to use the version specific to this buildimage. BAZEL_BUILD_OPTS += --override_repository=sonic_swss_common=/sonic/src/sonic-swss-common +# Newer version of gcc has spurious warnings in boringssl package. +BAZEL_BUILD_OPTS += --copt=-Wno-array-bounds +BAZEL_BUILD_OPTS += --copt=-Wno-stringop-overflow + # Build optimized, stripped binaries. BAZEL_BUILD_OPTS += -c opt