-
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
Initial Draft for gNOI/gNMI splitter #1930
Draft
hdwhdw
wants to merge
1
commit into
sonic-net:master
Choose a base branch
from
hdwhdw:splitter
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# GNMI/GNOI Splitter for Smart Switch # | ||
|
||
## Table of Contents | ||
|
||
### 1. Revision History | ||
|
||
| Rev | Date | Author | Change Description | | ||
| --- | ---------- | ---------------- | ------------------ | | ||
| 0.1 | 02/18/2025 | Dawei Huang | Initial version | | ||
|
||
### 2. Overview | ||
|
||
This document describes the GNMI/GNOI Splitter for Smart Switch. The splitter is a software component that separates GNMI and GNOI traffic and forwards them to the appropriate handlers. | ||
|
||
#### 2.1 Background | ||
|
||
The gNMI/gNOI Splitter arises from the following two architectural background in the smartswitch: | ||
- `Offloaded gNMI/gNOI Server` | ||
Due to the limited resources on the DPU, the gNMI server is offloaded onto the NPU. The gNMI server on the NPU is responsible for handling gNMI requests and responses. | ||
The server is running on a separate `gnmi` container on the NPU, named `gnmidpu[x]`, where `x` is the DPU number. The DPU itself still retains a `gnmi` container used for the gNOI traffic. The splitter is used to separate the gNMI and gNOI traffic and forward them to the appropriate servers. | ||
- `DPU Isolation` | ||
Due to security requirement, the DPU is isolated from external network, i.e. the DPU's management interface is not accessible from external network and only accessible via the NPU. Hence we need a proxy on NPU to forward the gNOI traffic to the DPU. | ||
|
||
#### 2.2 Scope | ||
The scope of this document includes the design and implementation of the gNMI/gNOI Splitter, as well as its integration with the existing gNMI and gNOI servers. More specifically, this document covers the following aspects: | ||
|
||
- Architecture | ||
- gNMI/gNOI Splitter, offloaded gNMI server, and gNOI server | ||
- Configuration | ||
- gRPC server configuration | ||
|
||
#### 2.3 Dependencies### | ||
- gNMI/gNOI Servers | ||
The splitter relies on the GNMI and GNOI servers to handle incoming requests. The servers must be properly configured and running for the splitter to function correctly. | ||
- Network Configuration | ||
The splitter requires a network configuration that allows it to receive and forward traffic to the appropriate servers, whether on NPU or DPU. | ||
|
||
### 3. Definitions/Abbreviations | ||
|
||
| Term | Meaning | | ||
| ----- | ----------------------------------------- | | ||
| DPU | Data Processing Unit | | ||
| gNMI | gRPC Network Management Interface | | ||
| gNOI | gRPC Network Operations Interface | | ||
| NPU | Network Processing Unit | | ||
| ASIC | Application Specific Integrated Circuit | | ||
|
||
### 4. Architecture | ||
|
||
#### 4.1 Offloaded gNMI vs gNMI | ||
|
||
The offloaded gNMI server is running on the NPU and is responsible for the following requests: | ||
|
||
- All `gNMI` requests。 | ||
- Part of `gNOI` requests that can only be served by the NPU, such as `System.Reboot`. | ||
|
||
The original/local `gNMI` container on the DPU is responsible for the remaining of `gNOI` requests. | ||
|
||
{ width=40% } | ||
|
||
#### 4.2 gNMI/gNOI Splitter | ||
|
||
The gNMI/gNOI Splitter is a gRPC server that listens on the NPU and forwards the requests to the appropriate servers. The splitter is responsible for the following tasks: | ||
- Receiving incoming gRPC requests. | ||
- Determines whether the request is a gNMI or gNOI request. | ||
- If it is a gNOI request, whether it is a request that can only be served by the NPU. | ||
- Forwards the request to the appropriate server. | ||
|
||
#### 4.3 Containers and Ports | ||
The splitter is running as a seperate gRPC server on the offloaded gNMI container on the NPU (`gnmidpu[x]`), and listens on a different port than the offloaded gNMI server. | ||
|
||
### 5. SAI API | ||
The gNMI/gNOI Splitter does not use any SAI APIs. | ||
|
||
### 6. Configuration | ||
The gNMI/gNOI Splitter is configured using the following parameters: | ||
- `gRPC server port` (new) | ||
The port on which the splitter listens for incoming requests. | ||
- `Offloaded server address` | ||
The address of the offloaded gNMI server. | ||
- `Offloaded server port` | ||
The port on which the offloaded gNMI server listens for incoming requests. | ||
- `DPU server address` | ||
The address of the local gNOI server. | ||
- `DPU server port` | ||
The port on which the local gNOI server listens for incoming requests. | ||
|
||
### 7. Testing | ||
|
||
#### 7.1 Unit test | ||
The splitter is tested using unit tests to ensure that it correctly forwards requests to the appropriate servers. | ||
|
||
#### 7.2 Integration test | ||
The splitter is tested in an integrated environment to ensure that it works correctly with the offloaded gNMI and local gNOI servers. |
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.
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.
Is DPU isolated?