Skip to content

Add Orchagent ZMQ table feature flag: orch_dash_zmq_enabled and orch_route_zmq_enabled.#22451

Merged
qiluo-msft merged 6 commits intosonic-net:masterfrom
liuh-80:dev/liuh/orch_zmq_config
May 6, 2025
Merged

Add Orchagent ZMQ table feature flag: orch_dash_zmq_enabled and orch_route_zmq_enabled.#22451
qiluo-msft merged 6 commits intosonic-net:masterfrom
liuh-80:dev/liuh/orch_zmq_config

Conversation

@liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Apr 27, 2025

Add Orchagent ZMQ table feature flag: orch_dash_zmq_enabled and orch_route_zmq_enabled

Why I did it

On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.

However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659

Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.

For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.

And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.

Work item tracking
  • Microsoft ADO (number only):32582830

How I did it

Add orch_dash_zmq_enabled and orch_route_zmq_enabled field to DEVICE_METADATA table in config_db.

orch_dash_zmq_enabled:
Control enable/disable ZMQ on Dash feature.

orch_route_zmq_enabled:
Control enable/disable ZMQ between fpmsyncd and orchagent for improve route performance.

How to verify it

Pass all test case.

Manually verified orch_zmq_tables.conf can generate correctly according to CONFIG_DB

admin@vlab-01:$ sonic-db-cli CONFIG_DB hset "DEVICE_METADATA|localhost" "orch_route_zmq_enabled" "true"
1
admin@vlab-01:
$ sonic-db-cli CONFIG_DB hset "DEVICE_METADATA|localhost" "orch_dash_zmq_enabled" "true"
1
admin@vlab-01:$ sudo config save -y
Running command: /usr/local/bin/sonic-cfggen -d --print-data > /etc/sonic/config_db.json
admin@vlab-01:
$ sudo config reload -y
Acquired lock on /etc/sonic/reload.lock
Disabling container and routeCheck monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Running command: /usr/local/bin/sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sonic-environment.j2,/etc/sonic/sonic-environment
Restarting SONiC target ...
Enabling container and routeCheck monitoring ...
Reloading Monit configuration ...
Reinitializing monit daemon
Released lock on /etc/sonic/reload.lock
admin@vlab-01:~$ docker exec -it swss bash
root@sonic:/# cat /etc/swss/orch_zmq_tables.conf
DASH_VNET_TABLE
DASH_QOS_TABLE
DASH_ENI_TABLE
DASH_ACL_IN_TABLE
DASH_ACL_OUT_TABLE
DASH_ACL_GROUP_TABLE
DASH_ACL_RULE_TABLE
DASH_HA_SET_TABLE
DASH_HA_SCOPE_TABLE
DASH_PREFIX_TAG_TABLE
DASH_ROUTING_TYPE_TABLE
DASH_APPLIANCE_TABLE
DASH_ROUTE_TABLE
DASH_ROUTE_RULE_TABLE
DASH_VNET_MAPPING_TABLE
DASH_ENI_ROUTE_TABLE
DASH_ROUTE_GROUP_TABLE
DASH_TUNNEL_TABLE
DASH_PA_VALIDATION_TABLE
DASH_METER_POLICY_TABLE
DASH_METER_RULE_TABLE
DASH_ROUTING_APPLIANCE_TABLE
DASH_ENI_FORWARD_TABLE
ROUTE_TABLE
LABEL_ROUTE_TABLE

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Add Orchagent ZMQ table feature flag: orch_dash_zmq_enabled and orch_route_zmq_enabled

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80 liuh-80 marked this pull request as ready for review April 27, 2025 14:57
@liuh-80 liuh-80 requested a review from qiluo-msft as a code owner April 27, 2025 14:57
@liuh-80 liuh-80 requested review from lguohan and xumia as code owners April 28, 2025 03:03
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80
Copy link
Contributor Author

liuh-80 commented Apr 28, 2025

/azpw ms_conflict

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80
Copy link
Contributor Author

liuh-80 commented Apr 29, 2025

/azpw run ms_conflict

@mssonicbld
Copy link
Collaborator

/AzurePipelines run ms_conflict

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@liuh-80
Copy link
Contributor Author

liuh-80 commented Apr 29, 2025

/azpw ms_conflict

@qiluo-msft qiluo-msft requested a review from prsunny April 29, 2025 20:22
qiluo-msft
qiluo-msft previously approved these changes Apr 29, 2025
Copy link
Contributor

@prabhataravind prabhataravind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline

prsunny pushed a commit to sonic-net/sonic-swss that referenced this pull request May 2, 2025
* Improve swss to support ZMQ

Why I did it
swssconfig does not support ZMQ

How I did it
Improve swss to support ZMQ
swssconfig will load orchagent ZMQ table list from CONFIG_DB, and create ZMQ channel according to the config:
sonic-net/sonic-buildimage#22451
@qiluo-msft
Copy link
Collaborator

/azpw ms_conflict

@qiluo-msft qiluo-msft merged commit e39bf6e into sonic-net:master May 6, 2025
19 checks passed
prsunny pushed a commit to sonic-net/sonic-swss that referenced this pull request Jun 18, 2025
Improve orchagent to enable Dash ZMQ by feature flag.

Why I did it
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.

However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659

Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.

For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.

And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.

ZMQ feature flag add by following PR:
sonic-net/sonic-buildimage#22451
divyagayathri-hcl pushed a commit to divyagayathri-hcl/sonic-swss that referenced this pull request Jun 22, 2025
Improve orchagent to enable Dash ZMQ by feature flag.

Why I did it
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.

However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659

Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.

For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.

And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.

ZMQ feature flag add by following PR:
sonic-net/sonic-buildimage#22451
divyagayathri-hcl pushed a commit to divyagayathri-hcl/sonic-swss that referenced this pull request Jun 23, 2025
* Improve swss to support ZMQ

Why I did it
swssconfig does not support ZMQ

How I did it
Improve swss to support ZMQ
swssconfig will load orchagent ZMQ table list from CONFIG_DB, and create ZMQ channel according to the config:
sonic-net/sonic-buildimage#22451
divyagayathri-hcl pushed a commit to divyagayathri-hcl/sonic-swss that referenced this pull request Jun 23, 2025
Improve orchagent to enable Dash ZMQ by feature flag.

Why I did it
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.

However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659

Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.

For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.

And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.

ZMQ feature flag add by following PR:
sonic-net/sonic-buildimage#22451
prsunny pushed a commit to sonic-net/sonic-swss that referenced this pull request Jun 23, 2025
* Improve route orch performance by enable ZMQ

Why I did it
For improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag, HLD: sonic-net/SONiC#1659

ZMQ feature flag add by following PR, because ZMQ flag renamed. may need another PR to update:
sonic-net/sonic-buildimage#22451
@vivekrnv
Copy link
Contributor

vivekrnv commented Jun 25, 2025

@liuh-80, @prsunny, @prabhataravind This change would break backward compatibility for SmartSwitchDpu types that are already using ZMQ for GNMI <-> orchagent communication

Please update the t1-smartswitch preset to have this config (orch_dash_zmq_enabled) as part of "DEVICE_METADATA|localhost" table.

https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-config-engine/config_samples.py#L156

@prabhataravind
Copy link
Contributor

@liuh-80, @prsunny, @prabhataravind This change would break backward compatibility for SmartSwitchDpu types that are already using ZMQ for GNMI <-> orchagent communication

Please update the t1-smartswitch preset to have this config (orch_dash_zmq_enabled) as part of "DEVICE_METADATA|localhost" table.

https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-config-engine/config_samples.py#L156

@qiluo-msft for viz

@liuh-80
Copy link
Contributor Author

liuh-80 commented Jun 25, 2025

@liuh-80, @prsunny, @prabhataravind This change would break backward compatibility for SmartSwitchDpu types that are already using ZMQ for GNMI <-> orchagent communication

Please update the t1-smartswitch preset to have this config (orch_dash_zmq_enabled) as part of "DEVICE_METADATA|localhost" table.

https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-config-engine/config_samples.py#L156

Hi @vivekrnv , This change will not break the feature because:

  1. the orch_dash_zmq_enabled is for SmartSwitchDpu GNMI <-> orchagent. it's same feature, just improve to enable/disable by this feature flag, and also the feature is enabled by default when pass ZMQ address with port.
  2. there is another draft PR will rename this feature flag to orch_northbond_dash_zmq_enabled: [Orchagent] Enable ZMQ on orchagent route table. #23028

@vivekrnv
Copy link
Contributor

vivekrnv commented Jun 26, 2025

  1. orch_dash_zmq_enabled

Hi @liuh-80,

I checked the orchagent code. It is enabled by default. Thanks for the clarification

@liuh-80 liuh-80 deleted the dev/liuh/orch_zmq_config branch July 23, 2025 02:02
liuh-80 added a commit to liuh-80/sonic-swss that referenced this pull request Aug 31, 2025
* Improve swss to support ZMQ

Why I did it
swssconfig does not support ZMQ

How I did it
Improve swss to support ZMQ
swssconfig will load orchagent ZMQ table list from CONFIG_DB, and create ZMQ channel according to the config:
sonic-net/sonic-buildimage#22451
liuh-80 added a commit to liuh-80/sonic-swss that referenced this pull request Aug 31, 2025
Improve orchagent to enable Dash ZMQ by feature flag.

Why I did it
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.

However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659

Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.

For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.

And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.

ZMQ feature flag add by following PR:
sonic-net/sonic-buildimage#22451
liuh-80 added a commit to liuh-80/sonic-swss that referenced this pull request Aug 31, 2025
* Improve route orch performance by enable ZMQ

Why I did it
For improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag, HLD: sonic-net/SONiC#1659

ZMQ feature flag add by following PR, because ZMQ flag renamed. may need another PR to update:
sonic-net/sonic-buildimage#22451
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
* Improve swss to support ZMQ

Why I did it
swssconfig does not support ZMQ

How I did it
Improve swss to support ZMQ
swssconfig will load orchagent ZMQ table list from CONFIG_DB, and create ZMQ channel according to the config:
sonic-net/sonic-buildimage#22451
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
Improve orchagent to enable Dash ZMQ by feature flag.

Why I did it
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.

However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659

Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.

For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.

And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.

ZMQ feature flag add by following PR:
sonic-net/sonic-buildimage#22451
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
* Improve route orch performance by enable ZMQ

Why I did it
For improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag, HLD: sonic-net/SONiC#1659

ZMQ feature flag add by following PR, because ZMQ flag renamed. may need another PR to update:
sonic-net/sonic-buildimage#22451
balanokia pushed a commit to balanokia/sonic-swss that referenced this pull request Nov 17, 2025
* Improve swss to support ZMQ

Why I did it
swssconfig does not support ZMQ

How I did it
Improve swss to support ZMQ
swssconfig will load orchagent ZMQ table list from CONFIG_DB, and create ZMQ channel according to the config:
sonic-net/sonic-buildimage#22451
balanokia pushed a commit to balanokia/sonic-swss that referenced this pull request Nov 17, 2025
Improve orchagent to enable Dash ZMQ by feature flag.

Why I did it
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.

However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659

Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.

For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.

And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.

ZMQ feature flag add by following PR:
sonic-net/sonic-buildimage#22451
balanokia pushed a commit to balanokia/sonic-swss that referenced this pull request Nov 17, 2025
* Improve route orch performance by enable ZMQ

Why I did it
For improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag, HLD: sonic-net/SONiC#1659

ZMQ feature flag add by following PR, because ZMQ flag renamed. may need another PR to update:
sonic-net/sonic-buildimage#22451
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Feb 4, 2026
Improve orchagent to enable Dash ZMQ by feature flag.

Why I did it
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.

However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659

Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.

For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.

And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.

ZMQ feature flag add by following PR:
sonic-net/sonic-buildimage#22451

Signed-off-by: Lawrence Lee <[email protected]>
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Feb 4, 2026
* Improve route orch performance by enable ZMQ

Why I did it
For improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag, HLD: sonic-net/SONiC#1659

ZMQ feature flag add by following PR, because ZMQ flag renamed. may need another PR to update:
sonic-net/sonic-buildimage#22451

Signed-off-by: Lawrence Lee <[email protected]>
baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
* Improve swss to support ZMQ

Why I did it
swssconfig does not support ZMQ

How I did it
Improve swss to support ZMQ
swssconfig will load orchagent ZMQ table list from CONFIG_DB, and create ZMQ channel according to the config:
sonic-net/sonic-buildimage#22451

Signed-off-by: Baorong Liu <[email protected]>
baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
Improve orchagent to enable Dash ZMQ by feature flag.

Why I did it
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.

However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659

Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.

For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.

And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.

ZMQ feature flag add by following PR:
sonic-net/sonic-buildimage#22451

Signed-off-by: Baorong Liu <[email protected]>
baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
* Improve route orch performance by enable ZMQ

Why I did it
For improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag, HLD: sonic-net/SONiC#1659

ZMQ feature flag add by following PR, because ZMQ flag renamed. may need another PR to update:
sonic-net/sonic-buildimage#22451

Signed-off-by: Baorong Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants