-
Notifications
You must be signed in to change notification settings - Fork 601
Add per-port MACsec PFC mode attribute #2293
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
Open
darius-nexthop
wants to merge
1
commit into
opencomputeproject:master
Choose a base branch
from
darius-nexthop:macsec-pfc-mode
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.
+28
−0
Open
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 hidden or 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 |
|---|---|---|
|
|
@@ -407,6 +407,22 @@ typedef enum _sai_port_priority_flow_control_mode_t | |
|
|
||
| } sai_port_priority_flow_control_mode_t; | ||
|
|
||
| /** | ||
| * @brief MACsec PFC mode | ||
| * | ||
| * Controls whether PFC frames on a MACsec-enabled port are handled as | ||
| * normal clear PFC frames or as encrypted/secure PFC frames. | ||
| */ | ||
| typedef enum _sai_port_macsec_pfc_mode_t | ||
| { | ||
| /** Default behavior: clear PFC */ | ||
| SAI_PORT_MACSEC_PFC_MODE_UNENCRYPTED, | ||
|
|
||
| /** Secure / encrypted PFC */ | ||
| SAI_PORT_MACSEC_PFC_MODE_ENCRYPTED, | ||
|
|
||
| } sai_port_macsec_pfc_mode_t; | ||
|
|
||
| /** | ||
| * @brief PTP mode | ||
| * These modes can be used at the port and switch level. | ||
|
|
@@ -1508,6 +1524,18 @@ typedef enum _sai_port_attr_t | |
| */ | ||
| SAI_PORT_ATTR_MACSEC_PORT_LIST, | ||
|
|
||
| /** | ||
| * @brief Configure per-port MACsec PFC mode | ||
| * | ||
| * When MACsec is not enabled on the port, implementations may ignore this | ||
| * attribute and behave as SAI_PORT_MACSEC_PFC_MODE_UNENCRYPTED. | ||
| * | ||
| * @type sai_port_macsec_pfc_mode_t | ||
| * @flags CREATE_AND_SET | ||
| * @default SAI_PORT_MACSEC_PFC_MODE_UNENCRYPTED | ||
| */ | ||
| SAI_PORT_ATTR_MACSEC_PFC_MODE, | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New attr is placed in-between the existing attr - pl note that this placement changes the enum integer values of subsequent port attributes, which is an API break. The SAI community convention is to add new attributes at the end of the list, immediately before SAI_XXX_ATTR_END |
||
| /** | ||
| * @brief Enable/Disable Mirror session | ||
| * | ||
|
|
||
Oops, something went wrong.
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.
Why is the SAI_PORT_ATTR_MACSEC_PFC_MODE placed in saiport.h rather than as a SAI_MACSEC_PORT_ATTR_* in saimacsec.h on SAI_OBJECT_TYPE_MACSEC_PORT? All other MACsec port config id defined there. Placing it on the generic port creates GET/SET ambiguity when MACSEC is not enabled on this port.