From 902c986ecd34ca4c83a9aa60b4cad0c96526e2ee Mon Sep 17 00:00:00 2001 From: Shaofeng Wu <69145577+ShaofengWu123@users.noreply.github.com> Date: Thu, 16 Jan 2025 01:17:35 +0800 Subject: [PATCH] [Routing actions] Fix incorrect arguments in do_action_encap_u1 (#652) Argument of `do_action_encap_u1` should be from `meta.u1_encap_data`. Previously, `meta.u0_encap_data` was used. --- .../routing_action_encap_underlay.p4 | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dash-pipeline/bmv2/routing_actions/routing_action_encap_underlay.p4 b/dash-pipeline/bmv2/routing_actions/routing_action_encap_underlay.p4 index ebe27c786..c0dc8d992 100644 --- a/dash-pipeline/bmv2/routing_actions/routing_action_encap_underlay.p4 +++ b/dash-pipeline/bmv2/routing_actions/routing_action_encap_underlay.p4 @@ -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); } } }