Skip to content

Commit 2f652c0

Browse files
committed
Update global_trusted_vni order 0, eni_trusted_vni order 1
1 parent 896fd2d commit 2f652c0

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

dash-pipeline/SAI/specs/dash_trusted_vni.yaml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,29 @@ description: DASH trusted VNI
44
api_type: overlay
55
sai_apis:
66
- !!python/object:utils.sai_spec.sai_api.SaiApi
7-
name: eni_trusted_vni_entry
8-
description: ENI trusted VNI entry
7+
name: global_trusted_vni_entry
8+
description: global trusted VNI entry
99
is_object: false
1010
enums:
1111
- !!python/object:utils.sai_spec.sai_enum.SaiEnum
12-
name: sai_eni_trusted_vni_entry_action_t
13-
description: 'Attribute data for #SAI_ENI_TRUSTED_VNI_ENTRY_ATTR_ACTION'
12+
name: sai_global_trusted_vni_entry_action_t
13+
description: 'Attribute data for #SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_ACTION'
1414
members:
1515
- !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember
16-
name: SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT
16+
name: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT
1717
description: ''
1818
value: '0'
1919
structs:
2020
- !!python/object:utils.sai_spec.sai_struct.SaiStruct
21-
name: sai_eni_trusted_vni_entry_t
22-
description: Entry for eni_trusted_vni_entry
21+
name: sai_global_trusted_vni_entry_t
22+
description: Entry for global_trusted_vni_entry
2323
members:
2424
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
2525
name: switch_id
2626
description: Switch ID
2727
type: sai_object_id_t
2828
objects: SAI_OBJECT_TYPE_SWITCH
2929
valid_only: null
30-
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
31-
name: eni_id
32-
description: Exact matched key eni_id
33-
type: sai_object_id_t
34-
objects: SAI_OBJECT_TYPE_ENI
35-
valid_only: null
3630
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
3731
name: vni_range
3832
description: Range matched key vni_range
@@ -41,11 +35,11 @@ sai_apis:
4135
valid_only: null
4236
attributes:
4337
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
44-
name: SAI_ENI_TRUSTED_VNI_ENTRY_ATTR_ACTION
38+
name: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_ACTION
4539
description: Action
46-
type: sai_eni_trusted_vni_entry_action_t
40+
type: sai_global_trusted_vni_entry_action_t
4741
attr_value_field: null
48-
default: SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT
42+
default: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT
4943
isresourcetype: false
5044
flags: CREATE_AND_SET
5145
object_name: null
@@ -57,55 +51,53 @@ sai_apis:
5751
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
5852
tables:
5953
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
60-
id: 49840895
54+
id: 45800410
6155
single_match_priority: true
6256
stage: null
6357
keys:
64-
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaKey
65-
name: eni_id
66-
id: 1
67-
match_type: exact
68-
field: u16
69-
bitwidth: 16
70-
ip_is_v6_field_id: 0
71-
is_object_key: false
7258
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaKey
7359
name: vni_range
74-
id: 2
60+
id: 1
7561
match_type: range
7662
field: u32range
7763
bitwidth: 24
7864
ip_is_v6_field_id: 0
7965
is_object_key: false
8066
actions:
81-
SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
82-
name: SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT
67+
SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
68+
name: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT
8369
id: 29028174
8470
attr_params: {}
8571
- !!python/object:utils.sai_spec.sai_api.SaiApi
86-
name: global_trusted_vni_entry
87-
description: global trusted VNI entry
72+
name: eni_trusted_vni_entry
73+
description: ENI trusted VNI entry
8874
is_object: false
8975
enums:
9076
- !!python/object:utils.sai_spec.sai_enum.SaiEnum
91-
name: sai_global_trusted_vni_entry_action_t
92-
description: 'Attribute data for #SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_ACTION'
77+
name: sai_eni_trusted_vni_entry_action_t
78+
description: 'Attribute data for #SAI_ENI_TRUSTED_VNI_ENTRY_ATTR_ACTION'
9379
members:
9480
- !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember
95-
name: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT
81+
name: SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT
9682
description: ''
9783
value: '0'
9884
structs:
9985
- !!python/object:utils.sai_spec.sai_struct.SaiStruct
100-
name: sai_global_trusted_vni_entry_t
101-
description: Entry for global_trusted_vni_entry
86+
name: sai_eni_trusted_vni_entry_t
87+
description: Entry for eni_trusted_vni_entry
10288
members:
10389
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
10490
name: switch_id
10591
description: Switch ID
10692
type: sai_object_id_t
10793
objects: SAI_OBJECT_TYPE_SWITCH
10894
valid_only: null
95+
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
96+
name: eni_id
97+
description: Exact matched key eni_id
98+
type: sai_object_id_t
99+
objects: SAI_OBJECT_TYPE_ENI
100+
valid_only: null
109101
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
110102
name: vni_range
111103
description: Range matched key vni_range
@@ -114,11 +106,11 @@ sai_apis:
114106
valid_only: null
115107
attributes:
116108
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
117-
name: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_ACTION
109+
name: SAI_ENI_TRUSTED_VNI_ENTRY_ATTR_ACTION
118110
description: Action
119-
type: sai_global_trusted_vni_entry_action_t
111+
type: sai_eni_trusted_vni_entry_action_t
120112
attr_value_field: null
121-
default: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT
113+
default: SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT
122114
isresourcetype: false
123115
flags: CREATE_AND_SET
124116
object_name: null
@@ -130,20 +122,28 @@ sai_apis:
130122
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
131123
tables:
132124
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
133-
id: 45800410
125+
id: 49840895
134126
single_match_priority: true
135127
stage: null
136128
keys:
137129
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaKey
138-
name: vni_range
130+
name: eni_id
139131
id: 1
132+
match_type: exact
133+
field: u16
134+
bitwidth: 16
135+
ip_is_v6_field_id: 0
136+
is_object_key: false
137+
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaKey
138+
name: vni_range
139+
id: 2
140140
match_type: range
141141
field: u32range
142142
bitwidth: 24
143143
ip_is_v6_field_id: 0
144144
is_object_key: false
145145
actions:
146-
SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
147-
name: SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT
146+
SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
147+
name: SAI_ENI_TRUSTED_VNI_ENTRY_ACTION_PERMIT
148148
id: 29028174
149149
attr_params: {}

dash-pipeline/SAI/specs/sai_spec.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ object_types:
4747
- SAI_OBJECT_TYPE_DASH_TUNNEL_NEXT_HOP
4848
- SAI_OBJECT_TYPE_OUTBOUND_PORT_MAP
4949
- SAI_OBJECT_TYPE_OUTBOUND_PORT_MAP_PORT_RANGE_ENTRY
50-
- SAI_OBJECT_TYPE_ENI_TRUSTED_VNI_ENTRY
5150
- SAI_OBJECT_TYPE_GLOBAL_TRUSTED_VNI_ENTRY
51+
- SAI_OBJECT_TYPE_ENI_TRUSTED_VNI_ENTRY
5252
object_entries:
5353
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
5454
name: direction_lookup_entry
@@ -116,18 +116,18 @@ object_entries:
116116
type: sai_outbound_port_map_port_range_entry_t
117117
objects: null
118118
valid_only: object_type == SAI_OBJECT_TYPE_OUTBOUND_PORT_MAP_PORT_RANGE_ENTRY,
119-
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
120-
name: eni_trusted_vni_entry
121-
description: Object entry for DASH API eni_trusted_vni_entry
122-
type: sai_eni_trusted_vni_entry_t
123-
objects: null
124-
valid_only: object_type == SAI_OBJECT_TYPE_ENI_TRUSTED_VNI_ENTRY,
125119
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
126120
name: global_trusted_vni_entry
127121
description: Object entry for DASH API global_trusted_vni_entry
128122
type: sai_global_trusted_vni_entry_t
129123
objects: null
130124
valid_only: object_type == SAI_OBJECT_TYPE_GLOBAL_TRUSTED_VNI_ENTRY,
125+
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
126+
name: eni_trusted_vni_entry
127+
description: Object entry for DASH API eni_trusted_vni_entry
128+
type: sai_eni_trusted_vni_entry_t
129+
objects: null
130+
valid_only: object_type == SAI_OBJECT_TYPE_ENI_TRUSTED_VNI_ENTRY,
131131
enums:
132132
- !!python/object:utils.sai_spec.sai_enum.SaiEnum
133133
name: sai_dash_direction_t

dash-pipeline/bmv2/stages/trusted_vni.p4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ control trusted_vni_stage(
77
{
88
action permit() {}
99

10-
@SaiTable[single_match_priority = "true", api = "dash_trusted_vni", order=1, isobject="false"]
10+
@SaiTable[single_match_priority = "true", api = "dash_trusted_vni", order=0, isobject="false"]
1111
table global_trusted_vni {
1212
key = {
1313
meta.rx_encap.vni: range @SaiVal[name = "vni_range"];
@@ -18,7 +18,7 @@ control trusted_vni_stage(
1818
}
1919
}
2020

21-
@SaiTable[single_match_priority = "true", api = "dash_trusted_vni"]
21+
@SaiTable[single_match_priority = "true", api = "dash_trusted_vni", order=1]
2222
table eni_trusted_vni {
2323
key = {
2424
meta.eni_id : exact @SaiVal[type="sai_object_id_t"];

0 commit comments

Comments
 (0)