From mboxrd@z Thu Jan 1 00:00:00 1970 From: Saleh Alsouqi Subject: [PATCH] app/testpmd: fix mpls bos bit default value Date: Wed, 21 Nov 2018 14:47:24 +0000 Message-ID: <20181121144709.18805-1-salehals@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , Ori Kam , "stable@dpdk.org" To: "wenzhuo.lu@intel.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" Return-path: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The Bottom-of-Stack (bos) bit of MPLS indicates whether its the last MPLS layer (1) or not (0). Indicating that the encapsulating MPLS is the last MPLS layer in the packet as the default behavior is more appropriate since multiple encapsulation actions is not supported. Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation") Fixes: a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation") cc: stable@dpdk.org Signed-off-by: Saleh AlSouqi --- app/test-pmd/cmdline_flow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 23ea7cc82..5c0108fa7 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -3808,6 +3808,7 @@ parse_vc_action_mplsogre_encap(struct context *ctx, c= onst struct token *token, header +=3D sizeof(gre); memcpy(mpls.label_tc_s, mplsogre_encap_conf.label, RTE_DIM(mplsogre_encap_conf.label)); + mpls.label_tc_s[2] |=3D 0x1; memcpy(header, &mpls, sizeof(mpls)); header +=3D sizeof(mpls); action_encap_data->conf.size =3D header - @@ -3998,6 +3999,7 @@ parse_vc_action_mplsoudp_encap(struct context *ctx, c= onst struct token *token, header +=3D sizeof(udp); memcpy(mpls.label_tc_s, mplsoudp_encap_conf.label, RTE_DIM(mplsoudp_encap_conf.label)); + mpls.label_tc_s[2] |=3D 0x1; memcpy(header, &mpls, sizeof(mpls)); header +=3D sizeof(mpls); action_encap_data->conf.size =3D header - --=20 2.14.1