mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-10-30 01:32:35 +00:00
Add switch for synchronous mode (#5237)
Add a master switch so that the sync/async mode can be configured.
Example usage of the switch:
1. Configure mode while building an image
`make ENABLE_SYNCHRONOUS_MODE=y <target>`
2. Configure when the device is running
Change CONFIG_DB with `sonic-cfggen -a '{"DEVICE_METADATA":{"localhost": {"synchronous_mode": "enable"}}}' --write-to-db`
Restart swss with `systemctl restart swss`
This commit is contained in:
@@ -25,6 +25,12 @@ ORCHAGENT_ARGS="-d /var/log/swss "
|
||||
# Set orchagent pop batch size to 8192
|
||||
ORCHAGENT_ARGS+="-b 8192 "
|
||||
|
||||
# Set synchronous mode if it is enabled in CONFIG_DB
|
||||
SYNC_MODE=$(echo $SWSS_VARS | jq -r '.synchronous_mode')
|
||||
if [ "$SYNC_MODE" == "enable" ]; then
|
||||
ORCHAGENT_ARGS+="-s "
|
||||
fi
|
||||
|
||||
# Check if there is an "asic_id field" in the DEVICE_METADATA in configDB.
|
||||
#"DEVICE_METADATA": {
|
||||
# "localhost": {
|
||||
|
||||
Reference in New Issue
Block a user