From patchwork Thu Jan 30 16:59:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ori Kam X-Patchwork-Id: 65383 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A945BA0525; Thu, 30 Jan 2020 17:59:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 85E021C035; Thu, 30 Jan 2020 17:59:43 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 2C0111C065 for ; Thu, 30 Jan 2020 17:59:41 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from orika@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Jan 2020 18:59:40 +0200 Received: from pegasus03.mtr.labs.mlnx (pegasus03.mtr.labs.mlnx [10.210.16.124]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 00UGxenf025583; Thu, 30 Jan 2020 18:59:40 +0200 From: Ori Kam To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Cc: dev@dpdk.org, orika@mellanox.com, ferruh.yigit@intel.com, viacheslavo@mellanox.com, stable@dpdk.org Date: Thu, 30 Jan 2020 16:59:35 +0000 Message-Id: <1580403575-142634-1-git-send-email-orika@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] app/testpmd: fix uninitialized members of mpls 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" Some of the memebers of the mpls struct are not initialized. this commit init the uninitialized members. Coverity issue: 325735 Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation") Cc: stable@dpdk.org Signed-off-by: Ori Kam Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline_flow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index e99e24c..c2cc4c5 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -4576,7 +4576,9 @@ static int comp_set_raw_index(struct context *, const struct token *, struct rte_flow_item_gre gre = { .protocol = rte_cpu_to_be_16(ETHER_TYPE_MPLS_UNICAST), }; - struct rte_flow_item_mpls mpls; + struct rte_flow_item_mpls mpls = { + .ttl = 0, + }; uint8_t *header; int ret;