From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B9698A04A2 for ; Mon, 11 May 2020 04:25:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 97A9F1D15A; Mon, 11 May 2020 04:25:51 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id AEEE81C2EE; Mon, 11 May 2020 04:25:48 +0200 (CEST) IronPort-SDR: QVx9UEQcZtKPUaJMuCVemi4l9gLQNQ2AZvZ/0gTcEVzupGjtELIpY79exN0DvPrMaIZzdqqZ64 43cWlaHEnpnQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2020 19:25:47 -0700 IronPort-SDR: tgqLpp5lVomW2nnSF0L9CmUf3wj1enRp5wDc533yHpouZ1yIHDuixUjQs9WfwNI1bAc4aJNJTg sEo/AuPiH2Mw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,378,1583222400"; d="scan'208";a="261608995" Received: from dpdk-xuting-main.sh.intel.com ([10.67.116.253]) by orsmga003.jf.intel.com with ESMTP; 10 May 2020 19:25:45 -0700 From: Ting Xu To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com, stable@dpdk.org Date: Mon, 11 May 2020 10:25:04 +0000 Message-Id: <20200511102504.23936-1-ting.xu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-stable] [PATCH v1] app/testpmd: fix DCB set failure in FreeBSD by clang X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" When set DCB in testpmd by clang, there is a segmentation fault. It is because the local variable rss_conf in get_eth_dcb_conf() is not cleared, so that the pointer member variable rss_key has a random address, which leads to an error in the following processing. This patch initialized the local variable rss_conf to avoid random address. Fixes: b57b66a97ebf ("app/testpmd: support mbuf dynamic flag") Cc: stable@dpdk.org Signed-off-by: Ting Xu --- app/test-pmd/testpmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 99bacddbf..1276476ca 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3408,6 +3408,7 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, int32_t rc; struct rte_eth_rss_conf rss_conf; + memset(&rss_conf, 0, sizeof(struct rte_eth_rss_conf)); /* * Builds up the correct configuration for dcb+vt based on the vlan tags array * given above, and the number of traffic classes available for use. -- 2.17.1