-
Notifications
You must be signed in to change notification settings - Fork 98
[dash-p4] Add ENI mode and trusted vni stage #672
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1e41ab2
1/ Add eni mode VM/FNIC 2/ Add trusted vni
jimmyzhai 0e3e5e3
Add table global_trusted_vni
jimmyzhai 076e899
Rename table trusted_vni -> eni_trusted_vni; Use global deny
jimmyzhai 896fd2d
Configure trusted vni in test cases
jimmyzhai 2f652c0
Update global_trusted_vni order 0, eni_trusted_vni order 1
jimmyzhai b5cdbaa
Add TODO to revisit the location of trusted vni stage
jimmyzhai a64d98d
Update comment of global_trusted_vni_create
jimmyzhai 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
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
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 |
---|---|---|
@@ -0,0 +1,149 @@ | ||
!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup | ||
name: dash_trusted_vni | ||
description: DASH trusted VNI | ||
api_type: overlay | ||
sai_apis: | ||
- !!python/object:utils.sai_spec.sai_api.SaiApi | ||
name: global_trusted_vni_entry | ||
description: global trusted VNI entry | ||
is_object: false | ||
enums: | ||
- !!python/object:utils.sai_spec.sai_enum.SaiEnum | ||
name: sai_global_trusted_vni_entry_action_t | ||
description: 'Attribute data for #SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_ACTION' | ||
members: | ||
- !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember | ||
name: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT | ||
description: '' | ||
value: '0' | ||
structs: | ||
- !!python/object:utils.sai_spec.sai_struct.SaiStruct | ||
name: sai_global_trusted_vni_entry_t | ||
description: Entry for global_trusted_vni_entry | ||
members: | ||
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry | ||
name: switch_id | ||
description: Switch ID | ||
type: sai_object_id_t | ||
objects: SAI_OBJECT_TYPE_SWITCH | ||
valid_only: null | ||
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry | ||
name: vni_range | ||
description: Range matched key vni_range | ||
type: sai_u32_range_t | ||
objects: null | ||
valid_only: null | ||
attributes: | ||
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute | ||
name: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_ACTION | ||
description: Action | ||
type: sai_global_trusted_vni_entry_action_t | ||
attr_value_field: null | ||
default: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT | ||
isresourcetype: false | ||
flags: CREATE_AND_SET | ||
object_name: null | ||
allow_null: false | ||
valid_only: null | ||
is_vlan: false | ||
deprecated: false | ||
stats: [] | ||
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta | ||
tables: | ||
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable | ||
id: 45800410 | ||
single_match_priority: true | ||
stage: null | ||
keys: | ||
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaKey | ||
name: vni_range | ||
id: 1 | ||
match_type: range | ||
field: u32range | ||
bitwidth: 24 | ||
ip_is_v6_field_id: 0 | ||
is_object_key: false | ||
actions: | ||
SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction | ||
name: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT | ||
id: 29028174 | ||
attr_params: {} | ||
- !!python/object:utils.sai_spec.sai_api.SaiApi | ||
name: eni_trusted_vni_entry | ||
description: ENI trusted VNI entry | ||
is_object: false | ||
enums: | ||
- !!python/object:utils.sai_spec.sai_enum.SaiEnum | ||
name: sai_eni_trusted_vni_entry_action_t | ||
description: 'Attribute data for #SAI_ENI_TRUSTED_VNI_ENTRY_ATTR_ACTION' | ||
members: | ||
- !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember | ||
name: SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT | ||
description: '' | ||
value: '0' | ||
structs: | ||
- !!python/object:utils.sai_spec.sai_struct.SaiStruct | ||
name: sai_eni_trusted_vni_entry_t | ||
description: Entry for eni_trusted_vni_entry | ||
members: | ||
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry | ||
name: switch_id | ||
description: Switch ID | ||
type: sai_object_id_t | ||
objects: SAI_OBJECT_TYPE_SWITCH | ||
valid_only: null | ||
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry | ||
name: eni_id | ||
description: Exact matched key eni_id | ||
type: sai_object_id_t | ||
objects: SAI_OBJECT_TYPE_ENI | ||
valid_only: null | ||
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry | ||
name: vni_range | ||
description: Range matched key vni_range | ||
type: sai_u32_range_t | ||
objects: null | ||
valid_only: null | ||
attributes: | ||
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute | ||
name: SAI_ENI_TRUSTED_VNI_ENTRY_ATTR_ACTION | ||
description: Action | ||
type: sai_eni_trusted_vni_entry_action_t | ||
attr_value_field: null | ||
default: SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT | ||
isresourcetype: false | ||
flags: CREATE_AND_SET | ||
object_name: null | ||
allow_null: false | ||
valid_only: null | ||
is_vlan: false | ||
deprecated: false | ||
stats: [] | ||
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta | ||
tables: | ||
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable | ||
id: 49840895 | ||
single_match_priority: true | ||
stage: null | ||
keys: | ||
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaKey | ||
name: eni_id | ||
id: 1 | ||
match_type: exact | ||
field: u16 | ||
bitwidth: 16 | ||
ip_is_v6_field_id: 0 | ||
is_object_key: false | ||
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaKey | ||
name: vni_range | ||
id: 2 | ||
match_type: range | ||
field: u32range | ||
bitwidth: 24 | ||
ip_is_v6_field_id: 0 | ||
is_object_key: false | ||
actions: | ||
SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction | ||
name: SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT | ||
id: 29028174 | ||
attr_params: {} |
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
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
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
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.
Will be great to update the title to cover all changes in this PR.
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.
Updated