Skip to content

Commit

Permalink
[dpapp] Add flow in bmv2 pipeline (#608)
Browse files Browse the repository at this point in the history
Following dpapp HLD - #606, this
is the 2nd part implementation. It updates bmv2 pipeline to have
stateful packet processing.
  • Loading branch information
jimmyzhai authored Oct 26, 2024
1 parent 1b3590a commit c3fd153
Show file tree
Hide file tree
Showing 39 changed files with 1,136 additions and 528 deletions.
64 changes: 32 additions & 32 deletions dash-pipeline/SAI/specs/dash_acl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 50200087
id: 37949057
actions:
default: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: default
id: 25655048
id: 21989040
attr_param_id: {}
- !!python/object:utils.sai_spec.sai_api.SaiApi
name: dash_acl_rule
Expand Down Expand Up @@ -194,116 +194,116 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 41950136
id: 43936368
actions:
SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT
id: 32161567
id: 24892843
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE
id: 20706700
id: 26577723
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY
id: 28146588
id: 31332881
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE
id: 31424218
id: 24146215
attr_param_id: {}
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 43016664
id: 48549629
actions:
SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT
id: 32161567
id: 24892843
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE
id: 20706700
id: 26577723
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY
id: 28146588
id: 31332881
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE
id: 31424218
id: 24146215
attr_param_id: {}
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 49695908
id: 40869404
actions:
SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT
id: 32161567
id: 24892843
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE
id: 20706700
id: 26577723
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY
id: 28146588
id: 31332881
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE
id: 31424218
id: 24146215
attr_param_id: {}
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 49209582
id: 49672642
actions:
SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT
id: 18858683
id: 22622424
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE
id: 24263137
id: 27458076
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY
id: 29962337
id: 27228779
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE
id: 26077229
id: 29275145
attr_param_id: {}
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 36478314
id: 37932124
actions:
SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT
id: 18858683
id: 22622424
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE
id: 24263137
id: 27458076
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY
id: 29962337
id: 27228779
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE
id: 26077229
id: 29275145
attr_param_id: {}
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 39012793
id: 46113118
actions:
SAI_DASH_ACL_RULE_ACTION_PERMIT: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT
id: 18858683
id: 22622424
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_PERMIT_AND_CONTINUE
id: 24263137
id: 27458076
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY
id: 29962337
id: 27228779
attr_param_id: {}
SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DASH_ACL_RULE_ACTION_DENY_AND_CONTINUE
id: 26077229
id: 29275145
attr_param_id: {}
4 changes: 2 additions & 2 deletions dash-pipeline/SAI/specs/dash_appliance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 41082190
id: 45177948
actions:
default: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: default
id: 29775410
id: 17143042
attr_param_id: {}
4 changes: 2 additions & 2 deletions dash-pipeline/SAI/specs/dash_direction_lookup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 44703784
id: 49875338
actions:
SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION
id: 17408972
id: 32588257
attr_param_id:
SAI_DIRECTION_LOOKUP_ENTRY_ATTR_DASH_ENI_MAC_OVERRIDE_TYPE: 1
8 changes: 4 additions & 4 deletions dash-pipeline/SAI/specs/dash_eni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 36648123
id: 39883185
actions:
SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ACTION_SET_ENI: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ACTION_SET_ENI
id: 24618133
id: 19019152
attr_param_id:
SAI_ENI_ETHER_ADDRESS_MAP_ENTRY_ATTR_ENI_ID: 1
- !!python/object:utils.sai_spec.sai_api.SaiApi
Expand Down Expand Up @@ -1642,9 +1642,9 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 45859274
id: 38483381
actions:
default: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: default
id: 27167550
id: 30359009
attr_param_id: {}
90 changes: 66 additions & 24 deletions dash-pipeline/SAI/specs/dash_flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,45 @@ sai_apis:
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_FLOW_ENTRY_ATTR_DASH_FLOW_SYNC_STATE
description: Action parameter DASH flow sync state
type: sai_dash_flow_sync_state_t
attr_value_field: s32
default: SAI_DASH_FLOW_SYNC_STATE_FLOW_MISS
isresourcetype: false
flags: CREATE_AND_SET
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_FLOW_ENTRY_ATTR_UNDERLAY0_SMAC
description: Action parameter underlay0 source MAC
type: sai_mac_t
attr_value_field: mac
default: vendor
isresourcetype: false
flags: CREATE_AND_SET
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_FLOW_ENTRY_ATTR_UNDERLAY0_DMAC
description: Action parameter underlay0 destination MAC
type: sai_mac_t
attr_value_field: mac
default: vendor
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:
Expand All @@ -544,30 +583,33 @@ sai_apis:
SAI_FLOW_ENTRY_ATTR_DASH_FLOW_ACTION: 3
SAI_FLOW_ENTRY_ATTR_METER_CLASS: 4
SAI_FLOW_ENTRY_ATTR_IS_UNIDIRECTIONAL_FLOW: 5
SAI_FLOW_ENTRY_ATTR_REVERSE_FLOW_ENI_MAC: 6
SAI_F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Y_ATTR_REVERSE_FLOW_SRC_IP: 10
SAI_FLOW_ENTRY_ATTR_REVERSE_FLOW_DST_IP: 11
SAI_FLOW_ENTRY_ATTR_REVERSE_FLOW_SRC_PORT: 12
SAI_FLOW_ENTRY_ATTR_REVERSE_FLOW_DST_PORT: 13
SAI_FLOW_ENTRY_ATTR_UNDERLAY0_VNET_ID: 15
SAI_FLOW_ENTRY_ATTR_UNDERLAY0_SIP: 16
SAI_FLOW_ENTRY_ATTR_UNDERLAY0_DIP: 17
SAI_FLOW_ENTRY_ATTR_UNDERLAY0_SMAC: 18
SAI_FLOW_ENTRY_ATTR_UNDERLAY0_DMAC: 19
SAI_FLOW_ENTRY_ATTR_UNDERLAY0_DASH_ENCAPSULATION: 20
SAI_FLOW_ENTRY_ATTR_UNDERLAY1_VNET_ID: 21
SAI_FLOW_ENTRY_ATTR_UNDERLAY1_SIP: 22
SAI_FLOW_ENTRY_ATTR_UNDERLAY1_DIP: 23
SAI_FLOW_ENTRY_ATTR_UNDERLAY1_SMAC: 24
SAI_FLOW_ENTRY_ATTR_UNDERLAY1_DMAC: 25
SAI_FLOW_ENTRY_ATTR_UNDERLAY1_DASH_ENCAPSULATION: 26
SAI_FLOW_ENTRY_ATTR_DST_MAC: 27
SAI_FLOW_ENTRY_ATTR_SIP: 28
SAI_FLOW_ENTRY_ATTR_DIP: 29
SAI_FLOW_ENTRY_ATTR_SIP_MASK: 30
SAI_FLOW_ENTRY_ATTR_DIP_MASK: 31
SAI_FLOW_ENTRY_ATTR_VENDOR_METADATA: 33
SAI_FLOW_ENTRY_ATTR_FLOW_DATA_PB: 34
- !!python/object:utils.sai_spec.sai_api.SaiApi
name: flow_entry_bulk_get_session_filter
description: flow entry bulk get session filter
Expand Down
14 changes: 7 additions & 7 deletions dash-pipeline/SAI/specs/dash_inbound_routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: false
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_OR
description: Action parameter meter class or
Expand Down Expand Up @@ -135,32 +135,32 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: false
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: 48545572
id: 35881437
actions:
SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP
id: 20241846
id: 26741158
attr_param_id:
SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_OR: 1
SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_AND: 2
SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP_PA_VALIDATE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_INBOUND_ROUTING_ENTRY_ACTION_TUNNEL_DECAP_PA_VALIDATE
id: 32575252
id: 26064107
attr_param_id:
SAI_INBOUND_ROUTING_ENTRY_ATTR_SRC_VNET_ID: 1
SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_OR: 2
SAI_INBOUND_ROUTING_ENTRY_ATTR_METER_CLASS_AND: 3
SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP
id: 30272260
id: 24482615
attr_param_id: {}
SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP_PA_VALIDATE: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_INBOUND_ROUTING_ENTRY_ACTION_VXLAN_DECAP_PA_VALIDATE
id: 24066060
id: 24695752
attr_param_id: {}
2 changes: 1 addition & 1 deletion dash-pipeline/SAI/specs/dash_outbound_ca_to_pa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 43335456
id: 48765007
actions:
SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_TUNNEL_MAPPING: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_OUTBOUND_CA_TO_PA_ENTRY_ACTION_SET_TUNNEL_MAPPING
Expand Down
6 changes: 3 additions & 3 deletions dash-pipeline/SAI/specs/dash_outbound_routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 44010720
id: 38546097
actions:
SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET
Expand Down Expand Up @@ -367,9 +367,9 @@ sai_apis:
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
- !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaTable
id: 34522254
id: 40572680
actions:
default: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: default
id: 20489967
id: 30077100
attr_param_id: {}
Loading

0 comments on commit c3fd153

Please sign in to comment.