Enable ZMQ between GNMI and Orchanget (#16661)

Enable ZMQ on gnmi and orchagent

#### Why I did it
Improve GNMI API performance for Dash resources

#### How I did it
Modify gnmi and orchagent service start script, add ZMQ parameter.

#### How to verify it
Pass all UT & E2E test
Manually verify with create Dash resources via gnmi API.
This commit is contained in:
Hua Liu 2023-10-10 05:22:50 +08:00 committed by GitHub
parent 875a6d9a1f
commit 6e3260098f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -69,4 +69,10 @@ else
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
fi
# Enable ZMQ for SmartSwitch
LOCALHOST_SUBTYPE=`sonic-db-cli CONFIG_DB hget localhost "subtype"`
if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then
ORCHAGENT_ARGS+=" -q tcp://127.0.0.1:8100"
fi
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}

View File

@ -70,6 +70,12 @@ else
TELEMETRY_ARGS+=" -v=2"
fi
# Enable ZMQ for SmartSwitch
LOCALHOST_SUBTYPE=`sonic-db-cli CONFIG_DB hget localhost "subtype"`
if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then
TELEMETRY_ARGS+=" -zmq_address=tcp://127.0.0.1:8100"
fi
# Server will handle threshold connections consecutively
THRESHOLD_CONNECTIONS=$(echo $GNMI | jq -r '.threshold')
if [[ $THRESHOLD_CONNECTIONS =~ ^[0-9]+$ ]]; then