Skip to content

Commit

Permalink
Remove inbound action.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Jul 31, 2024
1 parent 9aabd08 commit b9885bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
12 changes: 1 addition & 11 deletions dash-pipeline/SAI/specs/dash_direction_lookup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ sai_apis:
name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION
description: ''
value: '0'
- !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember
name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_INBOUND_DIRECTION
description: ''
value: '1'
structs:
- !!python/object:utils.sai_spec.sai_struct.SaiStruct
name: sai_direction_lookup_entry_t
Expand Down Expand Up @@ -61,8 +57,7 @@ sai_apis:
flags: CREATE_AND_SET
object_name: null
allow_null: false
valid_only: SAI_DIRECTION_LOOKUP_ENTRY_ATTR_ACTION == SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION
or SAI_DIRECTION_LOOKUP_ENTRY_ATTR_ACTION == SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_INBOUND_DIRECTION
valid_only: null
is_vlan: false
deprecated: false
stats: []
Expand All @@ -76,8 +71,3 @@ sai_apis:
id: 17408972
attr_param_id:
SAI_DIRECTION_LOOKUP_ENTRY_ATTR_DASH_ENI_MAC_OVERRIDE_TYPE: 1
SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_INBOUND_DIRECTION: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_INBOUND_DIRECTION
id: 21063902
attr_param_id:
SAI_DIRECTION_LOOKUP_ENTRY_ATTR_DASH_ENI_MAC_OVERRIDE_TYPE: 1
10 changes: 5 additions & 5 deletions dash-pipeline/bmv2/stages/direction_lookup.p4
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ control direction_lookup_stage(
set_eni_mac_type(dash_eni_mac_type_t.SRC_MAC, dash_eni_mac_override_type);
}

action set_inbound_direction(
@SaiVal[type="sai_dash_eni_mac_override_type_t"] dash_eni_mac_override_type_t dash_eni_mac_override_type
) {
action set_inbound_direction() {
meta.direction = dash_direction_t.INBOUND;
set_eni_mac_type(dash_eni_mac_type_t.DST_MAC, dash_eni_mac_override_type);
set_eni_mac_type(dash_eni_mac_type_t.DST_MAC, dash_eni_mac_override_type_t.NONE);
}

@SaiTable[name = "direction_lookup", api = "dash_direction_lookup"]
Expand All @@ -40,8 +38,10 @@ control direction_lookup_stage(

actions = {
set_outbound_direction;
set_inbound_direction;
@defaultonly set_inbound_direction;
}

const default_action = set_inbound_direction;
}

apply {
Expand Down

0 comments on commit b9885bc

Please sign in to comment.