Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix set_tunnel #467

Merged
merged 3 commits into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dash-pipeline/bmv2/dash_outbound.p4
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ control outbound(inout headers_t hdr,
}

action set_tunnel(IPv4Address underlay_dip,
dash_encapsulation_t dash_encapsulation,
bit<16> meter_class,
bit<1> meter_class_override) {
meta.encap_data.underlay_dip = underlay_dip;
meta.mapping_meter_class = meter_class;
meta.mapping_meter_class_override = meter_class_override;
meta.encap_data.dash_encapsulation = dash_encapsulation_t.VXLAN;
meta.encap_data.dash_encapsulation = dash_encapsulation;
}

action set_tunnel_mapping(IPv4Address underlay_dip,
Expand All @@ -137,6 +138,7 @@ control outbound(inout headers_t hdr,
meta.encap_data.overlay_dmac = overlay_dmac;

set_tunnel(underlay_dip,
dash_encapsulation_t.VXLAN,
meter_class,
meter_class_override);
}
Expand All @@ -149,7 +151,6 @@ control outbound(inout headers_t hdr,
bit<16> meter_class,
bit<1> meter_class_override) {
meta.encap_data.overlay_dmac = hdr.ethernet.dst_addr;
meta.encap_data.dash_encapsulation = dash_encapsulation;
meta.encap_data.vni = tunnel_key;

service_tunnel_encode(hdr,
Expand All @@ -159,6 +160,7 @@ control outbound(inout headers_t hdr,
0xffffffffffffffffffffffff);

set_tunnel(underlay_dip,
dash_encapsulation,
meter_class,
meter_class_override);
}
Expand Down