From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5DDE76A7D for ; Tue, 30 Sep 2014 11:28:00 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 30 Sep 2014 02:34:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,625,1406617200"; d="scan'208";a="607454552" Received: from bricha3-mobl.ger.corp.intel.com (HELO bricha3-mobl.ir.intel.com) ([10.243.20.27]) by fmsmga002.fm.intel.com with SMTP; 30 Sep 2014 02:34:02 -0700 Received: by bricha3-mobl.ir.intel.com (sSMTP sendmail emulation); Tue, 30 Sep 2014 10:34:01 +0001 Date: Tue, 30 Sep 2014 10:34:01 +0100 From: Bruce Richardson To: "Wiles, Roger Keith" Message-ID: <20140930093400.GA18200@BRICHA3-MOBL> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.22 (2013-10-16) Cc: "" Subject: Re: [dpdk-dev] Building current 1.8.1-rc1 with clang X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 09:28:00 -0000 On Mon, Sep 29, 2014 at 09:50:34PM +0000, Wiles, Roger Keith wrote: > I just pulled the current repo and stated a build with ‘make install T=x86_64-native-linuxapp-clang’ which produced the following error. I do not think I am allowed to modify this file, correct? If that is the case then someone will have to update the original source. If you want me to submit a patch I can, but I do not think I fully understand what needs to be done. > > From what I can tell the line: > dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); > needs to be: > dma_addr0 = _mm_setzero_si128(); > > == Build lib/librte_pmd_ixgbe > CC ixgbe_common.o > CC ixgbe_82598.o > CC ixgbe_82599.o > CC ixgbe_x540.o > CC ixgbe_phy.o > CC ixgbe_api.o > CC ixgbe_vf.o > CC ixgbe_dcb.o > CC ixgbe_dcb_82599.o > CC ixgbe_dcb_82598.o > CC ixgbe_mbx.o > CC ixgbe_rxtx.o > CC ixgbe_ethdev.o > CC ixgbe_fdir.o > CC ixgbe_pf.o > CC ixgbe_rxtx_vec.o > /home/keithw/projects/dpdk-code/org-dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:67:30: error: variable 'dma_addr0' is uninitialized > when used here [-Werror,-Wuninitialized] > dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); > ^~~~~~~~~ > /home/keithw/projects/dpdk-code/org-dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:57:2: note: variable 'dma_addr0' is declared here > __m128i dma_addr0, dma_addr1; > ^ > 1 error generated. > make[5]: *** [ixgbe_rxtx_vec.o] Error 1 > make[4]: *** [librte_pmd_ixgbe] Error 2 > make[3]: *** [lib] Error 2 > make[2]: *** [all] Error 2 > make[1]: *** [x86_64-native-linuxapp-clang_install] Error 2 > make: *** [install] Error 2 > > Thanks > ++Keith > > Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-213-5533 > I think a simple one-line change like below should fix it. The xor can also be written as a setzero call. diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c index 457f267..2236250 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c @@ -64,7 +64,7 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq) RTE_IXGBE_RXQ_REARM_THRESH) < 0) { if (rxq->rxrearm_nb + RTE_IXGBE_RXQ_REARM_THRESH >= rxq->nb_rx_desc) { - dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); + dma_addr0 = _mm_setzero_si128(); for (i = 0; i < RTE_IXGBE_DESCS_PER_LOOP; i++) { rxep[i].mbuf = &rxq->fake_mbuf; _mm_store_si128((__m128i *)&rxdp[i].read, /Bruce