Revert "[SAI PTF]Syncd-rpc and PTF docker support sai ptf v2 (#11610)" (#12677)

This reverts commit f0873f29d8.
This commit is contained in:
Liu Shilong 2022-11-14 09:56:10 +08:00 committed by GitHub
parent 109020c8e0
commit 6d78199d6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 7 additions and 84 deletions

View File

@ -121,7 +121,6 @@ jobs:
mv target/docker-sonic-vs.gz target/docker-sonic-vs-asan.gz
fi
make $BUILD_OPTIONS target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y SAITHRIFT_V2=y target/docker-ptf-sai.gz
if [ $(Build.Reason) != 'PullRequest' ];then
gzip -kd target/sonic-vs.img.gz
SONIC_RUN_CMDS="qemu-img convert target/sonic-vs.img -O vhdx -o subformat=dynamic target/sonic-vs.vhdx" make sonic-slave-run
@ -139,25 +138,9 @@ jobs:
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).raw
fi
if [ $(docker_syncd_rpc_image) == yes ]; then
# workaround for issue in rules/sairedis.dep, git ls-files will list un-exist files for cache
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/docker-syncd-$(platform_rpc)-rpc.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
if [ $(GROUP_NAME) == broadcom ]; then
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/docker-syncd-$(platform_rpc)-dnx-rpc.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y SAITHRIFT_V2=y target/docker-saiserverv2-brcm.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
echo BUILD_OPTIONS $BUILD_OPTIONS
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y SAITHRIFT_V2=y target/docker-syncd-brcm-rpcv2.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
fi
fi
if [ $(syncd_rpc_image) == yes ]; then

View File

@ -92,7 +92,6 @@ jobs:
fi
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_SYNCD_RPC=y SAITHRIFT_V2=y target/docker-ptf-sai.gz
else
if [ ${{ parameters.dbg_image }} == true ]; then
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) INSTALL_DEBUG_TOOLS=y target/sonic-${{ parameters.platform }}.bin && \
@ -106,20 +105,6 @@ jobs:
fi
if [ ${{ parameters.sync_rpc_image }} == true ]; then
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_SYNCD_RPC=y target/docker-syncd-${{ parameters.platform_short }}-rpc.gz
# workaround for issue in rules/sairedis.dep, git ls-files will list un-exist files for cache
pushd ./src/sonic-sairedis/SAI
git stash
popd
if [ ${{ parameters.platform }} == broadcom ]; then
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) SAITHRIFT_V2=y ENABLE_SYNCD_RPC=y target/docker-syncd-brcm-rpcv2.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_SYNCD_RPC=y SAITHRIFT_V2=y target/docker-saiserverv2-brcm.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
fi
fi
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/sonic-${{ parameters.platform }}.bin

View File

@ -16,7 +16,7 @@ RUN pip3 install crc16 \
getmac \
packet_helper \
psutil \
scapy \
scapy==2.4.4 \
scapy_helper \
pysubnettree \
xmlrunner
@ -39,8 +39,3 @@ RUN dpkg -r python-ptf
RUN git clone https://github.com/p4lang/ptf.git \
&& cd ptf \
&& python3.7 setup.py install --single-version-externally-managed --record /tmp/ptf_install.txt
run echo "declare -x LANG=\"C.UTF-8\"" >> /root/.bashrc
run echo "declare -x LC_ALL=\"C.UTF-8\"" >> /root/.bashrc
run echo "declare -x PYTHONIOENCODING=\"UTF-8\"" >> /root/.bashrc
run echo "declare -x VIRTUAL_ENV=\"/root/env-python3\"" >> /root/.bashrc

View File

@ -2,7 +2,7 @@
DOCKER_SAISERVER_BRCM = docker-saiserver$(SAITHRIFT_VER)-brcm.gz
$(DOCKER_SAISERVER_BRCM)_PATH = $(PLATFORM_PATH)/docker-saiserver-brcm
$(DOCKER_SAISERVER_BRCM)_DEPENDS += $(SAISERVER) $(SAISERVER_DBG)
$(DOCKER_SAISERVER_BRCM)_DEPENDS += $(SAISERVER)
$(DOCKER_SAISERVER_BRCM)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SAISERVER_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE)
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_BRCM)

View File

@ -1,17 +1,8 @@
# docker image for brcm syncd with rpc
DOCKER_SYNCD_BRCM_RPC = docker-syncd-brcm-rpc$(SAITHRIFT_VER).gz
DOCKER_SYNCD_BRCM_RPC_DBG = docker-syncd-brcm-rpc$(SAITHRIFT_VER)-$(DBG_IMAGE_MARK).gz
DOCKER_SYNCD_BRCM_RPC = docker-syncd-brcm-rpc.gz
$(DOCKER_SYNCD_BRCM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm-rpc
#Support two different versions of thrift
ifeq ($(SAITHRIFT_V2),y)
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT_0_14_1) $(LIBTHRIFT_0_14_1_DEV) $(PYTHON3_THRIFT_0_14_1) $(THRIFT_0_14_1_COMPILER) $(PTF)
else
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(PTF)
endif
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSWSSCOMMON_DBG) \
@ -19,21 +10,12 @@ $(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_BRCM_RPC)_FILES += $(DSSERVE) $(BCMCMD) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_BRCM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BASE)
$(DOCKER_SYNCD_BRCM_RPC)_DBG_DEPENDS += $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS)
$(DOCKER_SYNCD_BRCM_RPC)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)
endif
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_BRCM_RPC_DBG)
ifneq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_BRCM_RPC_DBG)
endif
$(DOCKER_SYNCD_BRCM_RPC)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_BRCM_RPC)_VERSION = 1.0.0+rpc
$(DOCKER_SYNCD_BRCM_RPC)_PACKAGE_NAME = syncd
@ -48,4 +30,3 @@ $(DOCKER_SYNCD_BRCM_RPC)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
$(DOCKER_SYNCD_BRCM_RPC)_MACHINE = broadcom
SONIC_BULLSEYE_DOCKERS += $(DOCKER_SYNCD_BRCM_RPC)
SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_SYNCD_BRCM_RPC_DBG)

View File

@ -25,7 +25,6 @@ RUN apt-get update \
cmake \
libqt5core5a \
libqt5network5 \
gdb \
libboost-atomic1.74.0
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \

View File

@ -3,7 +3,7 @@
DOCKER_PTF_SAI = docker-ptf-sai.gz
DOCKER_PTF_BASE = docker-ptf.gz
$(DOCKER_PTF_SAI)_PATH = $(DOCKERS_PATH)/docker-ptf-sai
$(DOCKER_PTF_SAI)_DEPENDS += $(LIBTHRIFT_0_14_1) $(PYTHON3_THRIFT_0_14_1)
$(DOCKER_PTF_SAI)_DEPENDS += $(LIBTHRIFT_2) $(PYTHON3_THRIFT_2)
$(DOCKER_PTF_SAI)_LOAD_DOCKERS += $(DOCKER_PTF_BASE)
SONIC_DOCKER_IMAGES += $(DOCKER_PTF_SAI)
SONIC_BUSTER_DOCKERS += $(DOCKER_PTF_SAI)

View File

@ -3,12 +3,6 @@
DOCKER_PTF = docker-ptf.gz
$(DOCKER_PTF)_PYTHON_WHEELS += $(PTF_PY3)
$(DOCKER_PTF)_PATH = $(DOCKERS_PATH)/docker-ptf
$(DOCKER_PTF)_DEPENDS += $(LIBTHRIFT) $(PYTHON_THRIFT) $(PTF)
#Don't need PYTHON_SAITHRIFT in SAITHRIFT_V2 environment
ifeq ($(SAITHRIFT_V2),)
$(DOCKER_PTF)_DEPENDS += $(PYTHON_SAITHRIFT)
else
$(info "SAITHRIFT_V2: $(SAITHRIFT_V2):skip install $(PYTHON_SAITHRIFT).")
endif
$(DOCKER_PTF)_DEPENDS += $(LIBTHRIFT) $(PYTHON_THRIFT) $(PTF) $(PYTHON_SAITHRIFT)
SONIC_DOCKER_IMAGES += $(DOCKER_PTF)
SONIC_BUSTER_DOCKERS += $(DOCKER_PTF)

View File

@ -2,20 +2,12 @@
SAI_VER = 0.9.4
LIBSAITHRIFT_DEV = libsaithrift$(SAITHRIFT_VER)-dev_$(SAI_VER)_$(CONFIGURED_ARCH).deb
LIBSAITHRIFT_DEV = libsaithrift-dev_$(SAI_VER)_$(CONFIGURED_ARCH).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) \
$(LIBSAIVS) $(LIBSAIVS_DEV) $(LIBSAIMETADATA) $(LIBSAIMETADATA_DEV)
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT_0_14_1) $(LIBSAIVS) $(LIBSAIMETADATA)
$(LIBSAITHRIFT_DEV)_BUILD_ENV = SAITHRIFTV2=true SAITHRIFT_VER=v2 platform=vs
else
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(PYTHON_THRIFT) $(THRIFT_COMPILER) \
$(LIBSAIVS) $(LIBSAIVS_DEV) $(LIBSAIMETADATA) $(LIBSAIMETADATA_DEV)
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT) $(LIBSAIVS) $(LIBSAIMETADATA)
$(LIBSAITHRIFT_DEV)_BUILD_ENV = platform=vs
endif
SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV)
PYTHON_SAITHRIFT = python-saithrift_$(SAI_VER)_$(CONFIGURED_ARCH).deb

View File

@ -17,13 +17,7 @@ $(SYNCD_RPC)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA)
$(eval $(call add_derived_package,$(SYNCD),$(SYNCD_RPC)))
# Inject libthrift build dependency for RPC build
# Support two different versions of thrift
ifeq ($(SAITHRIFT_V2),y)
$(SYNCD)_DEPENDS += $(LIBTHRIFT_0_14_1_DEV)
else
$(SYNCD)_DEPENDS += $(LIBTHRIFT_DEV)
endif
$(SYNCD)_DEPENDS += $(LIBSWSSCOMMON_DEV)
$(SYNCD)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBTHRIFT_DEV)
$(SYNCD)_DPKG_TARGET = binary-syncd-rpc
endif