Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dockers/docker-orchagent/docker-init.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CFGGEN_PARAMS=" \
-a "{\"ENABLE_ASAN\":\"{{ENABLE_ASAN}}\"}" \
{% endif %}
-y /etc/sonic/constants.yml \
-t /usr/share/sonic/templates/orch_zmq_tables.conf.j2,/etc/swss/orch_zmq_tables.conf \
-t /usr/share/sonic/templates/switch.json.j2,/etc/swss/config.d/switch.json \
-t /usr/share/sonic/templates/vxlan.json.j2,/etc/swss/config.d/vxlan.json \
-t /usr/share/sonic/templates/ipinip.json.j2,/etc/swss/config.d/ipinip.json \
Expand Down
29 changes: 29 additions & 0 deletions dockers/docker-orchagent/orch_zmq_tables.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% if DEVICE_METADATA.localhost.orch_dash_zmq_enabled == "false" %}
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
{% endif %}
{% if DEVICE_METADATA.localhost.orch_route_zmq_enabled == "true" %}
ROUTE_TABLE
LABEL_ROUTE_TABLE
{% endif %}
2 changes: 1 addition & 1 deletion rules/sonic-config.dep
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SPATH := $($(SONIC_CONFIG_ENGINE_PY3)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-config.mk rules/sonic-config.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(SPATH))
DEP_FILES += files/image_config/interfaces/interfaces.j2 dockers/docker-orchagent/ports.json.j2 dockers/docker-dhcp-relay/wait_for_intf.sh.j2 dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 dockers/docker-lldp/lldpd.conf.j2 dockers/docker-orchagent/ipinip.json.j2 $(shell find device -type f | sort) files/build_templates/qos_config.j2 dockers/docker-orchagent/switch.json.j2 dockers/docker-orchagent/vxlan.json.j2 files/image_config/constants/constants.yml
DEP_FILES += files/image_config/interfaces/interfaces.j2 dockers/docker-orchagent/ports.json.j2 dockers/docker-dhcp-relay/wait_for_intf.sh.j2 dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 dockers/docker-lldp/lldpd.conf.j2 dockers/docker-orchagent/ipinip.json.j2 $(shell find device -type f | sort) files/build_templates/qos_config.j2 dockers/docker-orchagent/switch.json.j2 dockers/docker-orchagent/vxlan.json.j2 files/image_config/constants/constants.yml dockers/docker-orchagent/orch_zmq_tables.conf.j2

ifeq ($(ENABLE_PY2_MODULES), y)
$(SONIC_CONFIG_ENGINE_PY2)_CACHE_MODE := GIT_CONTENT_SHA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,5 +669,23 @@
}
}
}
},
"DEVICE_METADATA_VALID_ORCH_DASH_ZMQ": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"orch_dash_zmq_enabled": true
}
}
}
},
"DEVICE_METADATA_VALID_ORCH_ROUTE_ZMQ": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"orch_route_zmq_enabled": true
}
}
}
}
}
12 changes: 12 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-device_metadata.yang
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,18 @@ module sonic-device_metadata {
type string;
description "Set source of anchor route";
}

leaf orch_dash_zmq_enabled {
type boolean;
description "Enable ZMQ feature on APPL_DB DASH tables.";
Copy link
Copy Markdown
Contributor

@prabhataravind prabhataravind Apr 30, 2025

Choose a reason for hiding this comment

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

Now that you have a dedicated flag for dash orchs to use zmq, can we deprecate the current '-q' option with zmq_server_address that is currently passed to orchagent in smartswitch to enable zmq b/w gnmi and orchagent and use this instead? Why not have a consistent way to enable zmq b/w orchagent and all other components like gnmi, fpmsyncd etc..?

Ref: #16661

Copy link
Copy Markdown
Contributor Author

@liuh-80 liuh-80 May 1, 2025

Choose a reason for hiding this comment

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

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.

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.

But the -q option will keep, because the ZMQ address is generated according to the mgmt_ip and eth0-midplane interface status.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

okay, please link all relevant zmq PRs together for convenience when you get a chance.

default "true";
}

leaf orch_route_zmq_enabled {
type boolean;
description "Enable ZMQ feature on APPL_DB ROUTE tables.";
default "false";
}
}
/* end of container localhost */
}
Expand Down
Loading