-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update GNMI path schema to support multi-asic and smartswitch #1625
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 tasks
qiluo-msft
reviewed
Feb 27, 2024
wen587
reviewed
Feb 28, 2024
* We use the first element to specify the target database. | ||
|
||
* We use the second element to specify the database instance: | ||
* For single asic device, this element is "localhost" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does single asic recognize "localhost" and parse that from GNMI's end?
I ask this because when we show running config, multi-asic has one more asic layer than single asic.
multi-asic's running config:
{
"localhost": {// host config
"ACL_TABLE":{..}
},
"aisc0": {// asic0 config, only exists if multi-asic
"ACL_TABLE":{..}
}
}
single asic's running config:
{//host's config
"ACL_TABLE":{..}
}
6 tasks
qiluo-msft
approved these changes
Mar 6, 2024
qiluo-msft
pushed a commit
to sonic-net/sonic-gnmi
that referenced
this pull request
Mar 13, 2024
### Why I did it We need to update sonic-gnmi to support new GNMI path schema. HLD PR: sonic-net/SONiC#1625 #### How I did it I add a new element in GNMI path to support database instance. ``` /APPL_DB/localhost/DASH_VNET_TABLE/vnet1/ ``` The second element is used for target database instance, and it's localhost by default. #### How to verify it Run unit test for sonic-gnmi. Run end to end test for dash and gnmi.
ganglyu
added a commit
to sonic-net/sonic-gnmi
that referenced
this pull request
Mar 18, 2024
#### Why I did it We have updated database configuration to support multiple databases for smartswitch. And then we need to update sonic-gnmi to support new database configuration and new GNMI path for smartswitch. HLD PR: sonic-net/SONiC#1625 #### How I did it * Support new database configuration ``` { "INCLUDES" : [ { "include" : "../../redis/sonic-db/database_config.json" }, { "container_name" : "dpu0", "include" : "../../redisdpu0/sonic-db/database_config.json" } ], "VERSION" : "1.0" } ``` Use a single layer instance for each device to support multiple asic and multiple dpu. For example, for multiple asic, the instances can be named localhost, asic0, asic1, and so on. For multiple dpu, the instances can be named localhost, dpu0, dpu1, and so on. For multiple asic npu and multiple dpu, the instances can be named localhost, asic0, asic1, ..., dpu0, dpu1, and so on. ``` "DPU_APPL_DB" : { "id" : 15, "separator": ":", "instance" : "redis", "format": "proto" }, ``` * Update GNMI path to support multiple database I add a new element in GNMI path to support database instance. ``` /APPL_DB/dpu0/DASH_VNET_TABLE/vnet1/ ``` The second element is used for target database instance, and it can be localhost, asic0, asic1, ..., dpu0, dpu1, and so on. #### How to verify it Run unit test for sonic-gnmi. Run end to end test for dash and gnmi.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Gang Lv [email protected]
What is the motivation for this PR?
GNMI native needs to support multi-asic device and smartswitch, so we need to update GNMI path schema.
PR: