Skip to content

Commit 2d7b827

Browse files
authoredFeb 28, 2025
[docker-orchagent] add -R flag for ring mode in orchagent.sh (sonic-net#19652)
[docker-orchagent] add -R flag for ring mode in orchagent.sh
1 parent a947a05 commit 2d7b827

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed
 

‎dockers/docker-orchagent/orchagent.sh

+6
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,10 @@ if [[ x"${MGMT_VRF_ENABLED}" == x"true" ]]; then
111111
ORCHAGENT_ARGS+=" -v mgmt"
112112
fi
113113

114+
# Enable ring buffer
115+
ORCHDAEMON_RING_ENABLED=`sonic-db-cli CONFIG_DB hget "DEVICE_METADATA|localhost" "ring_thread_enabled"`
116+
if [[ x"${ORCHDAEMON_RING_ENABLED}" == x"true" ]]; then
117+
ORCHAGENT_ARGS+=" -R"
118+
fi
119+
114120
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}

‎platform/vs/docker-sonic-vs/orchagent.sh

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ if [ "$SYNC_MODE" == "enable" ]; then
4646
ORCHAGENT_ARGS+="-s "
4747
fi
4848

49+
# Enable ring buffer
50+
ORCHDAEMON_RING_ENABLED=`sonic-db-cli CONFIG_DB hget "DEVICE_METADATA|localhost" "ring_thread_enabled"`
51+
if [[ x"${ORCHDAEMON_RING_ENABLED}" == x"true" ]]; then
52+
ORCHAGENT_ARGS+="-R "
53+
fi
54+
4955
# Set mac address
5056
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
5157

‎src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json

+9
Original file line numberDiff line numberDiff line change
@@ -545,5 +545,14 @@
545545
}
546546
}
547547
}
548+
},
549+
"DEVICE_METADATA_RING_THREAD_ENABLED": {
550+
"sonic-device_metadata:sonic-device_metadata": {
551+
"sonic-device_metadata:DEVICE_METADATA": {
552+
"sonic-device_metadata:localhost": {
553+
"ring_thread_enabled": true
554+
}
555+
}
556+
}
548557
}
549558
}

‎src/sonic-yang-models/yang-models/sonic-device_metadata.yang

+6
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ module sonic-device_metadata {
279279
default disabled;
280280
}
281281

282+
leaf ring_thread_enabled {
283+
type boolean;
284+
description "Enable gRingMode of OrchDaemon, which would set up its ring thread to accelerate task execution.";
285+
default "false";
286+
}
287+
282288
}
283289
/* end of container localhost */
284290
}

0 commit comments

Comments
 (0)