Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
17 changes: 0 additions & 17 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 0 additions & 15 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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
Expand Down
7 changes: 1 addition & 6 deletions dockers/docker-ptf-sai/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN pip3 install crc16 \
getmac \
packet_helper \
psutil \
scapy \
scapy==2.4.4 \
scapy_helper \
pysubnettree \
xmlrunner
Expand All @@ -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
2 changes: 1 addition & 1 deletion platform/broadcom/docker-saiserver-brcm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 1 addition & 20 deletions platform/broadcom/docker-syncd-brcm-rpc.mk
Original file line number Diff line number Diff line change
@@ -1,39 +1,21 @@
# 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) \
$(LIBSAIMETADATA_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
Expand All @@ -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)
1 change: 0 additions & 1 deletion platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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; } ; \
Expand Down
2 changes: 1 addition & 1 deletion platform/vs/docker-ptf-sai.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 1 addition & 7 deletions platform/vs/docker-ptf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 1 addition & 9 deletions platform/vs/libsaithrift-dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions rules/syncd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down