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 7B3F0A0350; Mon, 11 May 2020 09:50:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CE4AA1C2EE; Mon, 11 May 2020 09:50:36 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 3C4341BFAD; Mon, 11 May 2020 09:50:34 +0200 (CEST) IronPort-SDR: bGoFKie2L45swvgGTHAQBTJWx97Fqj0/VjSlMQ13xzR/Q87ZhdtYU2q7V4gbsxFKNR90yL8Ec/ NAVAKodSn6/A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2020 00:50:33 -0700 IronPort-SDR: nw275ZKVJY0b9C2ShQwdvwqmAcrSAu9O9bijHjTbELlOTRCKQac4UsihikEGIH08WveVows0dU ASRDSStGfWnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,379,1583222400"; d="scan'208";a="252531669" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga008.fm.intel.com with ESMTP; 11 May 2020 00:50:32 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 May 2020 00:50:31 -0700 Received: from cdsmsx103.ccr.corp.intel.com (172.17.3.37) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 May 2020 00:50:31 -0700 Received: from cdsmsx102.ccr.corp.intel.com ([169.254.2.168]) by CDSMSX103.ccr.corp.intel.com ([169.254.5.95]) with mapi id 14.03.0439.000; Mon, 11 May 2020 15:50:28 +0800 From: "Huang, ZhiminX" To: "Xu, Ting" , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Xing, Beilei" , "Iremonger, Bernard" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v1] app/testpmd: fix DCB set failure in FreeBSD by clang Thread-Index: AQHWJzuL6+iHMOrYnEyZpNxo6OFZG6iiguMw Date: Mon, 11 May 2020 07:50:27 +0000 Message-ID: <1DCDE90B92229844B9E6C0E67C1C8D6B046AF76D@CDSMSX102.ccr.corp.intel.com> References: <20200511102504.23936-1-ting.xu@intel.com> In-Reply-To: <20200511102504.23936-1-ting.xu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.6.105] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1] app/testpmd: fix DCB set failure in FreeBSD by clang 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" Tested-by: Huang, ZhiminX Regards, HuangZhiMin -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ting Xu Sent: Monday, May 11, 2020 6:25 PM To: dev@dpdk.org Cc: Lu, Wenzhuo ; Xing, Beilei ; Iremonger, Bernard ; stable@dpdk.org Subject: [dpdk-dev] [PATCH v1] app/testpmd: fix DCB set failure in FreeBSD = by clang 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 clea= red, so that the pointer member variable rss_key has a random address, whic= h 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 99bacddb= f..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 *e= th_conf, int32_t rc; struct rte_eth_rss_conf rss_conf; =20 + 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