From 9d9100eb99f360e2d502b4435035c5689da6bf68 Mon Sep 17 00:00:00 2001 From: Justin Wong Date: Sun, 19 Jul 2026 06:18:18 +0000 Subject: [PATCH] Add per-port counter discovery toggling based on CONFIG_DB Toggle the use of the per-port counter discovery arg based on whether enable_per_port_counter_discovery option is enabled in the HWSKU config. Signed-off-by: Justin Wong --- syncd/scripts/syncd_init_common.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/syncd/scripts/syncd_init_common.sh b/syncd/scripts/syncd_init_common.sh index db55b07576..a44571cede 100644 --- a/syncd/scripts/syncd_init_common.sh +++ b/syncd/scripts/syncd_init_common.sh @@ -66,6 +66,11 @@ if [ "$SUPPORTING_BULK_COUNTER_GROUPS" != "" ]; then CMD_ARGS+=" -B $SUPPORTING_BULK_COUNTER_GROUPS" fi +ENABLE_PER_PORT_COUNTER_DISCOVERY=$(echo $SYNCD_VARS | jq -r '.enable_per_port_counter_discovery') +if [ "$ENABLE_PER_PORT_COUNTER_DISCOVERY" == "true" ]; then + CMD_ARGS+=" -G" +fi + case "$(cat /proc/cmdline)" in *SONIC_BOOT_TYPE=fastfast*) if [ -e /var/warmboot/warm-starting ]; then