From patchwork Tue Jan 22 15:16:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dekel Peled X-Patchwork-Id: 49999 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5BACF2C52; Tue, 22 Jan 2019 16:22:04 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 357D02C37 for ; Tue, 22 Jan 2019 16:22:03 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 22 Jan 2019 17:21:59 +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 x0MFLxTi020343; Tue, 22 Jan 2019 17:21:59 +0200 From: Dekel Peled To: wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com Cc: shahafs@mellanox.com, dev@dpdk.org, orika@mellanox.com, dekelp@mellanox.com, stable@dpdk.org Date: Tue, 22 Jan 2019 17:16:43 +0200 Message-Id: <1548170203-49547-1-git-send-email-dekelp@mellanox.com> X-Mailer: git-send-email 1.7.1 Subject: [dpdk-dev] [PATCH] app/testpmd: fix Tx metadata show command 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Function cmd_config_tx_metadata_specific_parsed() takes input value, applies rte_cpu_to_be_32() on it, and stores it for Tx use. Function cmd_show_tx_metadata_parsed() displays the stored value as is. This patch modifies function cmd_show_tx_metadata_parsed(), to apply rte_be_to_cpu_32() on the stored value before displaying it. Fixes: c18feafa193c ("app/testpmd: support metadata as flow rule item") Cc: dekelp@mellanox.com Cc: stable@dpdk.org Signed-off-by: Dekel Peled Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 3ddc3e0..51704b5 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -18455,7 +18455,7 @@ struct cmd_show_tx_metadata_result { } if (!strcmp(res->cmd_keyword, "tx_metadata")) { printf("Port %u tx_metadata: %u\n", res->cmd_pid, - ports[res->cmd_pid].tx_metadata); + rte_be_to_cpu_32(ports[res->cmd_pid].tx_metadata)); } }