From eea338e2eafb4913156ed92eea347b339ac26f61 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 19 Apr 2017 11:32:50 -0700 Subject: [PATCH 1/9] Use syncd rpc for docker-syncd-rpc. Create docker-syncd-rpc for cavium and centec --- platform/broadcom/docker-syncd-brcm-rpc.mk | 2 +- platform/cavium/docker-syncd-cavm-rpc.mk | 7 +++ .../docker-syncd-cavm-rpc/Dockerfile.j2 | 56 +++++++++++++++++++ .../docker-syncd-cavm-rpc/ptf_nn_agent.conf | 10 ++++ .../docker-syncd-cavm-rpc/supervisord.conf | 2 + platform/centec/docker-syncd-centec-rpc.mk | 7 +++ .../docker-syncd-centec-rpc/Dockerfile.j2 | 56 +++++++++++++++++++ .../docker-syncd-centec-rpc/ptf_nn_agent.conf | 10 ++++ .../docker-syncd-centec-rpc/supervisord.conf | 2 + platform/mellanox/docker-syncd-mlnx-rpc.mk | 2 +- rules/sairedis.mk | 4 ++ src/sonic-sairedis | 2 +- 12 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 platform/cavium/docker-syncd-cavm-rpc.mk create mode 100644 platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2 create mode 100644 platform/cavium/docker-syncd-cavm-rpc/ptf_nn_agent.conf create mode 100644 platform/cavium/docker-syncd-cavm-rpc/supervisord.conf create mode 100644 platform/centec/docker-syncd-centec-rpc.mk create mode 100644 platform/centec/docker-syncd-centec-rpc/Dockerfile.j2 create mode 100644 platform/centec/docker-syncd-centec-rpc/ptf_nn_agent.conf create mode 100644 platform/centec/docker-syncd-centec-rpc/supervisord.conf diff --git a/platform/broadcom/docker-syncd-brcm-rpc.mk b/platform/broadcom/docker-syncd-brcm-rpc.mk index 2fbca8f30978..8efd25eb9b49 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc.mk +++ b/platform/broadcom/docker-syncd-brcm-rpc.mk @@ -2,7 +2,7 @@ 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) $(LIBTHRIFT) +$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(DOCKER_SYNCD_BRCM_RPC)_FILES += $(DSSERVE) $(BCMCMD) $(DOCKER_SYNCD_BRCM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BRCM) SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC) diff --git a/platform/cavium/docker-syncd-cavm-rpc.mk b/platform/cavium/docker-syncd-cavm-rpc.mk new file mode 100644 index 000000000000..ac725a1bbdeb --- /dev/null +++ b/platform/cavium/docker-syncd-cavm-rpc.mk @@ -0,0 +1,7 @@ +# docker image for cavium syncd with rpc + +DOCKER_SYNCD_CAVM_RPC = docker-syncd-cavm-rpc.gz +$(DOCKER_SYNCD_CAVM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-cavm-rpc +$(DOCKER_SYNCD_CAVM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS) +$(DOCKER_SYNCD_CAVM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_CAVM) +SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM_RPC) diff --git a/platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2 b/platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2 new file mode 100644 index 000000000000..04bb905e8f2a --- /dev/null +++ b/platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2 @@ -0,0 +1,56 @@ +FROM docker-syncd-cavm + +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +COPY \ +{% for deb in docker_syncd_cavm_rpc_debs.split(' ') -%} +debs/{{ deb }}{{' '}} +{%- endfor -%} +debs/ + +RUN dpkg -P syncd + +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \ +{% for deb in docker_syncd_cavm_rpc_debs.split(' ') -%} +dpkg_apt debs/{{ deb }}{{'; '}} +{%- endfor %} + +## Pre-install the fundamental packages +RUN apt-get update \ + && apt-get -y install \ + net-tools \ + python-pip \ + build-essential \ + libssl-dev \ + libffi-dev \ + python-dev \ + wget \ + cmake \ + supervisor \ + && 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 \ + && pip install cffi==1.7.0 \ + && pip install --upgrade cffi==1.7.0 \ + && pip install nnpy \ + && mkdir -p /opt \ + && cd /opt \ + && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ + && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ + && rm -rf /deps + +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf + +RUN sed -i 's/read/sysctl -w net.core.rmem_max=509430500 ; \/usr\/bin\/supervisord/' /usr/bin/start.sh + +ENTRYPOINT ["/bin/bash"] +CMD ["/usr/bin/start.sh"] diff --git a/platform/cavium/docker-syncd-cavm-rpc/ptf_nn_agent.conf b/platform/cavium/docker-syncd-cavm-rpc/ptf_nn_agent.conf new file mode 100644 index 000000000000..fa1ed0eb1622 --- /dev/null +++ b/platform/cavium/docker-syncd-cavm-rpc/ptf_nn_agent.conf @@ -0,0 +1,10 @@ +[program:ptf_nn_agent] +command=/usr/bin/python /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-iface-rcv-buffer=109430400 +process_name=ptf_nn_agent +stdout_logfile=/tmp/ptf_nn_agent.out.log +stderr_logfile=/tmp/ptf_nn_agent.err.log +redirect_stderr=false +autostart=true +autorestart=true +startsecs=1 +numprocs=1 diff --git a/platform/cavium/docker-syncd-cavm-rpc/supervisord.conf b/platform/cavium/docker-syncd-cavm-rpc/supervisord.conf new file mode 100644 index 000000000000..54296b8b254e --- /dev/null +++ b/platform/cavium/docker-syncd-cavm-rpc/supervisord.conf @@ -0,0 +1,2 @@ +[supervisord] +nodaemon=true diff --git a/platform/centec/docker-syncd-centec-rpc.mk b/platform/centec/docker-syncd-centec-rpc.mk new file mode 100644 index 000000000000..68b940f8d2b6 --- /dev/null +++ b/platform/centec/docker-syncd-centec-rpc.mk @@ -0,0 +1,7 @@ +# docker image for centec syncd with rpc + +DOCKER_SYNCD_CENTEC_RPC = docker-syncd-centec-rpc.gz +$(DOCKER_SYNCD_CENTEC_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-centec-rpc +$(DOCKER_SYNCD_CENTEC_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) +$(DOCKER_SYNCD_CENTEC_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_CENTEC) +SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC) diff --git a/platform/centec/docker-syncd-centec-rpc/Dockerfile.j2 b/platform/centec/docker-syncd-centec-rpc/Dockerfile.j2 new file mode 100644 index 000000000000..b5deb94154f6 --- /dev/null +++ b/platform/centec/docker-syncd-centec-rpc/Dockerfile.j2 @@ -0,0 +1,56 @@ +FROM docker-syncd-centec + +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +COPY \ +{% for deb in docker_syncd_centec_rpc_debs.split(' ') -%} +debs/{{ deb }}{{' '}} +{%- endfor -%} +debs/ + +RUN dpkg -P syncd + +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \ +{% for deb in docker_syncd_centec_rpc_debs.split(' ') -%} +dpkg_apt debs/{{ deb }}{{'; '}} +{%- endfor %} + +## Pre-install the fundamental packages +RUN apt-get update \ + && apt-get -y install \ + net-tools \ + python-pip \ + build-essential \ + libssl-dev \ + libffi-dev \ + python-dev \ + wget \ + cmake \ + supervisor \ + && 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 \ + && pip install cffi==1.7.0 \ + && pip install --upgrade cffi==1.7.0 \ + && pip install nnpy \ + && mkdir -p /opt \ + && cd /opt \ + && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ + && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ + && rm -rf /deps + +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf + +RUN sed -i 's/read/sysctl -w net.core.rmem_max=509430500 ; \/usr\/bin\/supervisord/' /usr/bin/start.sh + +ENTRYPOINT ["/bin/bash"] +CMD ["/usr/bin/start.sh"] diff --git a/platform/centec/docker-syncd-centec-rpc/ptf_nn_agent.conf b/platform/centec/docker-syncd-centec-rpc/ptf_nn_agent.conf new file mode 100644 index 000000000000..fa1ed0eb1622 --- /dev/null +++ b/platform/centec/docker-syncd-centec-rpc/ptf_nn_agent.conf @@ -0,0 +1,10 @@ +[program:ptf_nn_agent] +command=/usr/bin/python /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-iface-rcv-buffer=109430400 +process_name=ptf_nn_agent +stdout_logfile=/tmp/ptf_nn_agent.out.log +stderr_logfile=/tmp/ptf_nn_agent.err.log +redirect_stderr=false +autostart=true +autorestart=true +startsecs=1 +numprocs=1 diff --git a/platform/centec/docker-syncd-centec-rpc/supervisord.conf b/platform/centec/docker-syncd-centec-rpc/supervisord.conf new file mode 100644 index 000000000000..54296b8b254e --- /dev/null +++ b/platform/centec/docker-syncd-centec-rpc/supervisord.conf @@ -0,0 +1,2 @@ +[supervisord] +nodaemon=true diff --git a/platform/mellanox/docker-syncd-mlnx-rpc.mk b/platform/mellanox/docker-syncd-mlnx-rpc.mk index 7aab3c802327..8c5411454086 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc.mk +++ b/platform/mellanox/docker-syncd-mlnx-rpc.mk @@ -2,7 +2,7 @@ DOCKER_SYNCD_MLNX_RPC = docker-syncd-mlnx-rpc.gz $(DOCKER_SYNCD_MLNX_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-mlnx-rpc -$(DOCKER_SYNCD_MLNX_RPC)_DEPENDS += $(SYNCD) $(LIBTHRIFT) +$(DOCKER_SYNCD_MLNX_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(DOCKER_SYNCD_MLNX_RPC)_FILES += $(MLNX_FW) $(DOCKER_SYNCD_MLNX_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_MLNX) SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC) diff --git a/rules/sairedis.mk b/rules/sairedis.mk index 02c20ef54588..75f7ae6bcee3 100644 --- a/rules/sairedis.mk +++ b/rules/sairedis.mk @@ -13,6 +13,10 @@ SYNCD = syncd_1.0.0_amd64.deb $(SYNCD)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD))) +SYNCD_RPC = syncd-rpc_1.0.0_amd64.deb +$(SYNCD_RPC)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTHRIFT) +$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD))) + LIBSAIMETADATA = libsaimetadata_1.0.0_amd64.deb $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA))) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index e28e4c038572..230f322b66f4 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit e28e4c038572aeea65491424a86fcb4f1ac229de +Subproject commit 230f322b66f4da67b5dba7dbedf39e70219a21f7 From f4883b9ecd6891b35238d673aa812b08460d20ef Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 19 Apr 2017 11:38:06 -0700 Subject: [PATCH 2/9] Make docker-syncd-rpc by default --- platform/cavium/rules.mk | 3 ++- platform/centec/rules.mk | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/cavium/rules.mk b/platform/cavium/rules.mk index 0c112860192e..22d7a1ef4a72 100644 --- a/platform/cavium/rules.mk +++ b/platform/cavium/rules.mk @@ -8,7 +8,8 @@ include $(PLATFORM_PATH)/libsaithrift-dev.mk include $(PLATFORM_PATH)/python-saithrift.mk SONIC_ALL += $(SONIC_ONE_IMAGE) \ - $(DOCKER_FPM_GOBGP) + $(DOCKER_FPM_GOBGP) \ + $(DOCKER_SYNCD_CAVM_RPC) # Inject cavium sai into sairedis $(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) diff --git a/platform/centec/rules.mk b/platform/centec/rules.mk index 9e53996c0a36..642fe9f83f6c 100644 --- a/platform/centec/rules.mk +++ b/platform/centec/rules.mk @@ -6,7 +6,8 @@ include $(PLATFORM_PATH)/one-image.mk include $(PLATFORM_PATH)/libsaithrift-dev.mk include $(PLATFORM_PATH)/python-saithrift.mk -SONIC_ALL += $(SONIC_ONE_IMAGE) +SONIC_ALL += $(SONIC_ONE_IMAGE) \ + $(DOCKER_SYNCD_CENTEC_RPC) # Inject centec sai into sairedis $(LIBSAIREDIS)_DEPENDS += $(CENTEC_SAI) From 76f0f6043c2adf49fc57600e3767ca7402542fbb Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 19 Apr 2017 11:49:44 -0700 Subject: [PATCH 3/9] Remove /root/deps, not /deps after build --- platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 | 2 +- platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2 | 2 +- platform/centec/docker-syncd-centec-rpc/Dockerfile.j2 | 2 +- platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 index 40c573f09c79..c70920274709 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 @@ -45,7 +45,7 @@ RUN apt-get update \ && cd /opt \ && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ - && rm -rf /deps + && rm -rf /root/deps COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf diff --git a/platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2 b/platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2 index 04bb905e8f2a..1df6dc7802dd 100644 --- a/platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2 +++ b/platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2 @@ -45,7 +45,7 @@ RUN apt-get update \ && cd /opt \ && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ - && rm -rf /deps + && rm -rf /root/deps COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf diff --git a/platform/centec/docker-syncd-centec-rpc/Dockerfile.j2 b/platform/centec/docker-syncd-centec-rpc/Dockerfile.j2 index b5deb94154f6..a0384c14f571 100644 --- a/platform/centec/docker-syncd-centec-rpc/Dockerfile.j2 +++ b/platform/centec/docker-syncd-centec-rpc/Dockerfile.j2 @@ -45,7 +45,7 @@ RUN apt-get update \ && cd /opt \ && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ - && rm -rf /deps + && rm -rf /root/deps COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf diff --git a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 index 64e208112783..c8b312b1c677 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 @@ -45,7 +45,7 @@ RUN apt-get update \ && cd /opt \ && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ - && rm -rf /deps + && rm -rf /root/deps COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf From 5e5680262e52113a8e1cbb4a859212b394ec659e Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 19 Apr 2017 12:07:29 -0700 Subject: [PATCH 4/9] We need libthrift to build sonic-sairedic package --- rules/sairedis.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/sairedis.mk b/rules/sairedis.mk index 75f7ae6bcee3..a894e6b9583d 100644 --- a/rules/sairedis.mk +++ b/rules/sairedis.mk @@ -10,7 +10,7 @@ LIBSAIREDIS_DEV = libsairedis-dev_1.0.0_amd64.deb $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIREDIS_DEV))) SYNCD = syncd_1.0.0_amd64.deb -$(SYNCD)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) +$(SYNCD)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTHRIFT) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD))) SYNCD_RPC = syncd-rpc_1.0.0_amd64.deb From f363ac47e9532e2bdff0afe357d5e45c363f8258 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 19 Apr 2017 12:14:12 -0700 Subject: [PATCH 5/9] Use libthrift-dev --- rules/sairedis.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/sairedis.mk b/rules/sairedis.mk index a894e6b9583d..e5bcbada1075 100644 --- a/rules/sairedis.mk +++ b/rules/sairedis.mk @@ -10,11 +10,11 @@ LIBSAIREDIS_DEV = libsairedis-dev_1.0.0_amd64.deb $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIREDIS_DEV))) SYNCD = syncd_1.0.0_amd64.deb -$(SYNCD)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTHRIFT) +$(SYNCD)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTHRIFT_DEV) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD))) SYNCD_RPC = syncd-rpc_1.0.0_amd64.deb -$(SYNCD_RPC)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTHRIFT) +$(SYNCD_RPC)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTHRIFT_DEV) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD))) LIBSAIMETADATA = libsaimetadata_1.0.0_amd64.deb From 9470f65426f8400f8e3c01522bfc5963713846be Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 19 Apr 2017 12:21:18 -0700 Subject: [PATCH 6/9] Every package which is generated by sairedis requires saithrift --- rules/sairedis.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/sairedis.mk b/rules/sairedis.mk index e5bcbada1075..9d8d81966bff 100644 --- a/rules/sairedis.mk +++ b/rules/sairedis.mk @@ -2,7 +2,7 @@ LIBSAIREDIS = libsairedis_1.0.0_amd64.deb $(LIBSAIREDIS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis -$(LIBSAIREDIS)_DEPENDS += $(LIBSWSSCOMMON_DEV) +$(LIBSAIREDIS)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBTHRIFT_DEV) $(LIBSAIREDIS)_RDEPENDS += $(LIBSWSSCOMMON) SONIC_DPKG_DEBS += $(LIBSAIREDIS) @@ -10,11 +10,11 @@ LIBSAIREDIS_DEV = libsairedis-dev_1.0.0_amd64.deb $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIREDIS_DEV))) SYNCD = syncd_1.0.0_amd64.deb -$(SYNCD)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTHRIFT_DEV) +$(SYNCD)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD))) SYNCD_RPC = syncd-rpc_1.0.0_amd64.deb -$(SYNCD_RPC)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTHRIFT_DEV) +$(SYNCD_RPC)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD))) LIBSAIMETADATA = libsaimetadata_1.0.0_amd64.deb From 985e5543f3d0b24e561550598ca8b2d789946fd0 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 19 Apr 2017 13:20:17 -0700 Subject: [PATCH 7/9] Add libsaithrift into syncd --- platform/broadcom/rules.mk | 2 +- platform/cavium/rules.mk | 2 +- platform/centec/rules.mk | 2 +- platform/mellanox/rules.mk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/broadcom/rules.mk b/platform/broadcom/rules.mk index aaf5f5dc5fbc..8c37b5589062 100755 --- a/platform/broadcom/rules.mk +++ b/platform/broadcom/rules.mk @@ -25,7 +25,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT_IMAGE) \ $(DOCKER_SYNCD_BRCM_RPC) # Inject brcm sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(BRCM_OPENNSL) $(BRCM_SAI) $(BRCM_SAI_DEV) +$(LIBSAIREDIS)_DEPENDS += $(BRCM_OPENNSL) $(BRCM_SAI) $(BRCM_SAI_DEV) $(LIBSAITHRIFT_DEV_BRCM) # Runtime dependency on brcm sai is set only for syncd $(SYNCD)_RDEPENDS += $(BRCM_OPENNSL) $(BRCM_SAI) diff --git a/platform/cavium/rules.mk b/platform/cavium/rules.mk index 22d7a1ef4a72..c3317720ac8c 100644 --- a/platform/cavium/rules.mk +++ b/platform/cavium/rules.mk @@ -12,7 +12,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_SYNCD_CAVM_RPC) # Inject cavium sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) +$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) $(LIBSAITHRIFT_DEV_CAVM) # Runtime dependency on cavium sai is set only for syncd $(SYNCD)_RDEPENDS += $(CAVM_SAI) diff --git a/platform/centec/rules.mk b/platform/centec/rules.mk index 642fe9f83f6c..b9fefb1b141a 100644 --- a/platform/centec/rules.mk +++ b/platform/centec/rules.mk @@ -10,7 +10,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_SYNCD_CENTEC_RPC) # Inject centec sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(CENTEC_SAI) +$(LIBSAIREDIS)_DEPENDS += $(CENTEC_SAI) $(LIBSAITHRIFT_DEV_CENTEC) # Runtime dependency on centec sai is set only for syncd $(SYNCD)_RDEPENDS += $(CENTEC_SAI) diff --git a/platform/mellanox/rules.mk b/platform/mellanox/rules.mk index f0e8d4fcdb07..80a99e4d24fb 100644 --- a/platform/mellanox/rules.mk +++ b/platform/mellanox/rules.mk @@ -15,7 +15,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_SYNCD_MLNX_RPC) # Inject mlnx sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(MLNX_SAI) +$(LIBSAIREDIS)_DEPENDS += $(MLNX_SAI) $(LIBSAITHRIFT_DEV_MLNX) # Runtime dependency on mlnx sai is set only for syncd $(SYNCD)_RDEPENDS += $(MLNX_SAI) From 7f6d0191f6b772bc3f84c465a491984f39fb4ff3 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 19 Apr 2017 16:39:36 -0700 Subject: [PATCH 8/9] Fix issue with syncd build --- rules/sairedis.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/sairedis.mk b/rules/sairedis.mk index 9d8d81966bff..87838a3aeebe 100644 --- a/rules/sairedis.mk +++ b/rules/sairedis.mk @@ -15,7 +15,7 @@ $(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD))) SYNCD_RPC = syncd-rpc_1.0.0_amd64.deb $(SYNCD_RPC)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) -$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD))) +$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD_RPC))) LIBSAIMETADATA = libsaimetadata_1.0.0_amd64.deb $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA))) From 5070ffe2a51a20470e876255134a89f39b36fa77 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Thu, 20 Apr 2017 10:46:12 -0700 Subject: [PATCH 9/9] Add docker-syncd-rpc makefiles for all platforms --- platform/cavium/rules.mk | 1 + platform/centec/rules.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/platform/cavium/rules.mk b/platform/cavium/rules.mk index c3317720ac8c..4a13b5e070f6 100644 --- a/platform/cavium/rules.mk +++ b/platform/cavium/rules.mk @@ -1,5 +1,6 @@ include $(PLATFORM_PATH)/cavm-sai.mk include $(PLATFORM_PATH)/docker-syncd-cavm.mk +include $(PLATFORM_PATH)/docker-syncd-cavm-rpc.mk include $(PLATFORM_PATH)/docker-orchagent-cavm.mk include $(PLATFORM_PATH)/cavm-platform-modules.mk include $(PLATFORM_PATH)/cavm-xpnet.mk diff --git a/platform/centec/rules.mk b/platform/centec/rules.mk index b9fefb1b141a..0dcf050fe417 100644 --- a/platform/centec/rules.mk +++ b/platform/centec/rules.mk @@ -2,6 +2,7 @@ include $(PLATFORM_PATH)/sdk.mk include $(PLATFORM_PATH)/sai.mk include $(PLATFORM_PATH)/docker-orchagent-centec.mk include $(PLATFORM_PATH)/docker-syncd-centec.mk +include $(PLATFORM_PATH)/docker-syncd-centec-rpc.mk include $(PLATFORM_PATH)/one-image.mk include $(PLATFORM_PATH)/libsaithrift-dev.mk include $(PLATFORM_PATH)/python-saithrift.mk