Skip to content

Commit

Permalink
Remove deny action from direction lookup (#238)
Browse files Browse the repository at this point in the history
Make inbound direction a default of a table
Remove the deny option from SAI API as a result

Signed-off-by: Marian Pritsak <[email protected]>

Signed-off-by: Marian Pritsak <[email protected]>
  • Loading branch information
marian-pritsak authored Sep 29, 2022
1 parent 1e419c9 commit 9237de0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dash-pipeline/bmv2/dash_pipeline.p4
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ control dash_ingress(inout headers_t hdr,
meta.direction = direction_t.OUTBOUND;
}

action set_inbound_direction() {
meta.direction = direction_t.INBOUND;
}

@name("direction_lookup|dash_direction_lookup")
table direction_lookup {
key = {
Expand All @@ -61,8 +65,10 @@ control dash_ingress(inout headers_t hdr,

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

const default_action = set_inbound_direction;
}

action set_appliance(EthernetAddress neighbor_mac,
Expand Down Expand Up @@ -248,7 +254,6 @@ control dash_ingress(inout headers_t hdr,
}

/* If Outer VNI matches with a reserved VNI, then the direction is Outbound - */
meta.direction = direction_t.INBOUND;
direction_lookup.apply();

appliance.apply();
Expand Down

0 comments on commit 9237de0

Please sign in to comment.