Skip to content

Improve swssconfig to support ZMQ #3620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 2, 2025

Conversation

liuh-80
Copy link
Contributor

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

Improve swssconfig 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

Work item tracking
  • Microsoft ADO: 32582830

How to verify it

Pass all test cases.
Verified with PR: sonic-net/sonic-buildimage#22414

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Improve swssconfig to support ZMQ

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

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80 liuh-80 marked this pull request as ready for review April 23, 2025 08:39
@liuh-80 liuh-80 requested a review from prsunny as a code owner April 23, 2025 08:39
@liuh-80 liuh-80 requested a review from qiluo-msft April 23, 2025 23:52
@@ -39,12 +52,36 @@ void dump_db_item(KeyOpFieldsValuesTuple &db_item)
SWSS_LOG_DEBUG("]");
}

bool write_db_data(vector<KeyOpFieldsValuesTuple> &db_items)
bool is_zmq_table(string table_name, int zmq_flag)
Copy link
Contributor

@qiluo-msft qiluo-msft Apr 25, 2025

Choose a reason for hiding this comment

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

table_name

Suggest using a conffiles to list all the ZMQ applicable table names. It is more future-proof and also easy to implement. No need to define ZMQ enable feature flags #Closed

Copy link
Contributor Author

@liuh-80 liuh-80 Apr 28, 2025

Choose a reason for hiding this comment

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

Fixed, add new config in following PR:
sonic-net/sonic-buildimage#22451

@prsunny
Copy link
Collaborator

prsunny commented Apr 25, 2025

@theasianpianist , @prabhataravind for viz and review.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft requested a review from kcudnik April 27, 2025 23:48
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

qiluo-msft
qiluo-msft previously approved these changes Apr 29, 2025
* Orchagent ZMQ enabled table will stored in "DEVICE_METADATA|localhost" table "orch_zmq_tables" field.
*/
#define DEVICE_METADATA_LOCALHOST "DEVICE_METADATA|localhost"
#define ZMQ_TABLE_LIST_FIELD "orch_zmq_tables@"
Copy link
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.

Are these 3 #defines used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These no longer used, fixed.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit 02d4468 into sonic-net:master May 2, 2025
15 checks passed
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.

6 participants