From 5cef76b1e4a3e14f324f7cad024624d047ce1631 Mon Sep 17 00:00:00 2001 From: Junhua Zhai Date: Wed, 15 Sep 2021 09:25:32 +0000 Subject: [PATCH] 1. Update context_config.json for vs 2. Include gearsyncd and gbsyncd in docker-sonic-vs --- .../brcm_gearbox_vs/context_config.json | 8 +++++++- platform/vs/docker-sonic-vs/Dockerfile.j2 | 1 + platform/vs/docker-sonic-vs/start.sh | 5 +++++ platform/vs/docker-sonic-vs/supervisord.conf | 17 +++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/context_config.json b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/context_config.json index 9f9f80ba0d36..106087f7275c 100644 --- a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/context_config.json +++ b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/context_config.json @@ -7,6 +7,9 @@ "dbCounters" : "COUNTERS_DB", "dbFlex": "FLEX_COUNTER_DB", "dbState" : "STATE_DB", + "zmq_enable": false, + "zmq_endpoint": "tcp://127.0.0.1:5555", + "zmq_ntf_endpoint": "tcp://127.0.0.1:5556", "switches": [ { "index" : 0, @@ -21,10 +24,13 @@ "dbCounters" : "GB_COUNTERS_DB", "dbFlex": "GB_FLEX_COUNTER_DB", "dbState" : "STATE_DB", + "zmq_enable": false, + "zmq_endpoint": "tcp://127.0.0.1:5565", + "zmq_ntf_endpoint": "tcp://127.0.0.1:5566", "switches": [ { "index" : 1, - "hwinfo" : "" + "hwinfo": "mdio0_0_0/0" } ] } diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2 index 2e11cdaea3db..ab686d3a13de 100644 --- a/platform/vs/docker-sonic-vs/Dockerfile.j2 +++ b/platform/vs/docker-sonic-vs/Dockerfile.j2 @@ -175,6 +175,7 @@ COPY ["buffermgrd.sh", "/usr/bin/"] COPY ["platform.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/"] COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/"] +COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/"] # Workaround the tcpdump issue RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump diff --git a/platform/vs/docker-sonic-vs/start.sh b/platform/vs/docker-sonic-vs/start.sh index 93c9cf479d69..047918d2e518 100755 --- a/platform/vs/docker-sonic-vs/start.sh +++ b/platform/vs/docker-sonic-vs/start.sh @@ -109,6 +109,11 @@ fi /usr/bin/configdb-load.sh +if [ "$HWSKU" = "brcm_gearbox_vs" ]; then + supervisorctl start gbsyncd + supervisorctl start gearsyncd +fi + supervisorctl start syncd supervisorctl start portsyncd diff --git a/platform/vs/docker-sonic-vs/supervisord.conf b/platform/vs/docker-sonic-vs/supervisord.conf index 977b84117e3e..96f027131520 100644 --- a/platform/vs/docker-sonic-vs/supervisord.conf +++ b/platform/vs/docker-sonic-vs/supervisord.conf @@ -43,6 +43,23 @@ autorestart=false stdout_logfile=syslog stderr_logfile=syslog +[program:gbsyncd] +command=/usr/bin/syncd -s -p /usr/share/sonic/hwsku/pai.profile -x /usr/share/sonic/hwsku/context_config.json -g 1 +priority=4 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog + +[program:gearsyncd] +command=/usr/bin/gearsyncd -p /usr/share/sonic/hwsku/gearbox_config.json +startsecs=0 +priority=5 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog + [program:portsyncd] command=/usr/bin/portsyncd priority=5