Skip to content

Commit

Permalink
Fix ENI lookup ordering
Browse files Browse the repository at this point in the history
Signed-off-by: Marian Pritsak <[email protected]>
  • Loading branch information
marian-pritsak committed Jun 30, 2023
1 parent 07464d0 commit 99b0b8f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions dash-pipeline/bmv2/dash_pipeline.p4
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,12 @@ control dash_ingress(

/* Outer header processing */

/* Put VM's MAC in the direction agnostic metadata field */
meta.eni_addr = meta.direction == dash_direction_t.OUTBOUND ?
hdr.inner_ethernet.src_addr :
hdr.inner_ethernet.dst_addr;

eni_ether_address_map.apply();
if (meta.direction == dash_direction_t.OUTBOUND) {
vxlan_decap(hdr);
} else if (meta.direction == dash_direction_t.INBOUND) {
Expand All @@ -416,6 +422,8 @@ control dash_ingress(
}
}

/* At this point the processing is done on customer headers */

meta.is_overlay_ip_v6 = 0;
meta.ip_protocol = 0;
meta.dst_ip_addr = 0;
Expand All @@ -439,13 +447,6 @@ control dash_ingress(
meta.dst_l4_port = hdr.udp.dst_port;
}

/* At this point the processing is done on customer headers */

/* Put VM's MAC in the direction agnostic metadata field */
meta.eni_addr = meta.direction == dash_direction_t.OUTBOUND ?
hdr.ethernet.src_addr :
hdr.ethernet.dst_addr;
eni_ether_address_map.apply();
eni.apply();
if (meta.eni_data.admin_state == 0) {
deny();
Expand Down

0 comments on commit 99b0b8f

Please sign in to comment.