Skip to content

Commit

Permalink
[Routing actions] Fix incorrect arguments in do_action_encap_u1 (#652)
Browse files Browse the repository at this point in the history
Argument of `do_action_encap_u1` should be from `meta.u1_encap_data`.
Previously, `meta.u0_encap_data` was used.
  • Loading branch information
ShaofengWu123 authored Jan 15, 2025
1 parent 88a4771 commit 902c986
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions dash-pipeline/bmv2/routing_actions/routing_action_encap_underlay.p4
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ control do_action_encap_u1(
return;
}

if (meta.u0_encap_data.dash_encapsulation == dash_encapsulation_t.VXLAN) {
if (meta.u1_encap_data.dash_encapsulation == dash_encapsulation_t.VXLAN) {
push_vxlan_tunnel_u1(hdr,
meta.u0_encap_data.underlay_dmac,
meta.u0_encap_data.underlay_smac,
meta.u0_encap_data.underlay_dip,
meta.u0_encap_data.underlay_sip,
meta.u0_encap_data.vni);
meta.u1_encap_data.underlay_dmac,
meta.u1_encap_data.underlay_smac,
meta.u1_encap_data.underlay_dip,
meta.u1_encap_data.underlay_sip,
meta.u1_encap_data.vni);
}
else if (meta.u0_encap_data.dash_encapsulation == dash_encapsulation_t.NVGRE) {
else if (meta.u1_encap_data.dash_encapsulation == dash_encapsulation_t.NVGRE) {
push_nvgre_tunnel_u1(hdr,
meta.u0_encap_data.underlay_dmac,
meta.u0_encap_data.underlay_smac,
meta.u0_encap_data.underlay_dip,
meta.u0_encap_data.underlay_sip,
meta.u0_encap_data.vni);
meta.u1_encap_data.underlay_dmac,
meta.u1_encap_data.underlay_smac,
meta.u1_encap_data.underlay_dip,
meta.u1_encap_data.underlay_sip,
meta.u1_encap_data.vni);
}
}
}
Expand Down

0 comments on commit 902c986

Please sign in to comment.