-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add XDP hardware offload support for certain Mizar functions with Net…
…ronome NIC (#658) * easy shell for ustc * load transit_xdp1 with offload mode * update offloaded endpoint_map * add trn_transit_xdp1 with 3 layers function * replace xdp1 with xdp1_3layers and add related offload_map fd * update easy shell for ustc * update offloaded network_map * test for performance * test for vpc and modify num of ep&net * fix for merging * load offload XDP with double check * fix for ustc * fix for ustc * fix * reset * remove unnecessary file * Remove easy shell for USTC * Remove easy shell for USTC * fix for merging * Fix for PR * Fix for USTC * Fix update_vpc/net/ep unittest * Fix the code format and add some err handlers. * Remove offload CLI and Restrict offload NIC yaml * Remove offload CLI * Update original unittest in generic mode * Add unittest in offload mode * Fix log description err. * Fix the code style and format. * Remove changes of get_default_itf * Update for code style and format * Add rc to the log * Fix some errors * Fix offload codes * Fix offload codes * Remove blank line * Update docs * Update docs * Update * Update * Update
- Loading branch information
1 parent
d2ea874
commit 73965a6
Showing
12 changed files
with
1,070 additions
and
40 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
docs/design/features/offload_XDP/design_and_limitations.md
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,30 @@ | ||
<!-- | ||
SPDX-License-Identifier: MIT | ||
Copyright (c) 2021 The Authors. | ||
Authors: | ||
Peng Yang (@yangpenger) | ||
--> | ||
Netronome SmartNIC has following limitations: | ||
|
||
- Only supports maps of type BPF_MAP_TYPE_ARRAY/BPF_MAP_TYPE_HASH. | ||
- Constraints on the size of the maps: | ||
- Sum of map entries on the NIC should be less than 3,072,000; | ||
- A maximum limit of 64 bytes per entry. | ||
- Constraints on the size of the program: the maximum number of instructions on the SmartNIC is only 2800. | ||
- Does not support XDP_REDIRECT. | ||
|
||
|
||
|
||
Considering the limitations above, bouncers and dividers (forwarding function) are offloaded to the NIC. | ||
|
||
|
||
|
||
The first packet between two endpoints will pass through the bouncer/divider. This forwarding function will be implemented on the NIC. On the contrary, for the XDP program on the endpoint host's kernel, every packet (not only the first) will pass through it. The main function is to redirect rather than forward, so it is not the offloaded target. | ||
|
||
|
||
|
||
The offloaded workflow is as follows (The black line represents the logic of the mizar, and the red line represents the partial function offloaded to SmartNIC): | ||
|
||
![workflow of offloading XDP](offload_XDP_workflow.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
Oops, something went wrong.