From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 55A4E2BD5 for ; Mon, 19 Nov 2018 17:57:31 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 19 Nov 2018 19:03:07 +0200 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.128.130.87]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wAJGvQ29020663; Mon, 19 Nov 2018 18:57:26 +0200 From: Dekel Peled To: wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com Cc: dev@dpdk.org, orika@mellanox.com, shahafs@mellanox.com, dekelp@mellanox.com Date: Mon, 19 Nov 2018 18:54:50 +0200 Message-Id: <1542646490-37406-1-git-send-email-dekelp@mellanox.com> X-Mailer: git-send-email 1.7.1 Subject: [dpdk-dev] [PATCH] app/testpmd: fix MPLSoUDP encapsulation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2018 16:57:31 -0000 Set MPLS label value in appropriate location at mplsoudp_encap_conf, so it is correctly copied to rte_flow_item_mpls. Fixes: a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation") Cc: orika@mellanox.com Signed-off-by: Dekel Peled --- app/test-pmd/cmdline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 1275074..40e64cc 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -15804,10 +15804,10 @@ static void cmd_set_mplsoudp_encap_parsed(void *parsed_result, struct cmd_set_mplsoudp_encap_result *res = parsed_result; union { uint32_t mplsoudp_label; - uint8_t label[3]; + uint8_t label[4]; } id = { .mplsoudp_label = - rte_cpu_to_be_32(res->label) & RTE_BE32(0x00ffffff), + rte_cpu_to_be_32(res->label<<4) & RTE_BE32(0x00ffffff), }; if (strcmp(res->mplsoudp, "mplsoudp_encap") == 0) -- 1.8.3.1