From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 22E996931 for ; Mon, 31 Oct 2016 15:16:52 +0100 (CET) Received: from cpe-2606-a000-111b-40ed-7aac-c0ff-fec2-933b.dyn6.twc.com ([2606:a000:111b:40ed:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1c1DOB-0003mp-85; Mon, 31 Oct 2016 10:16:49 -0400 Date: Mon, 31 Oct 2016 10:16:30 -0400 From: Neil Horman To: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Message-ID: <20161031141630.GB15205@hmsreliant.think-freely.org> References: <20161031104318.GC4823@autoinstall.dev.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20161031104318.GC4823@autoinstall.dev.6wind.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Red Hat 6.5 compilation failure 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: Mon, 31 Oct 2016 14:16:52 -0000 On Mon, Oct 31, 2016 at 11:43:18AM +0100, Nélio Laranjeiro wrote: > Hi all, > > Am facing an issue with compilation on redhat 6.5 of DPDK v16.11-rc2, > compilation fails with: > > cc1: warnings being treated as errors > /root/dpdk/drivers/net/i40e/i40e_ethdev_vf.c: In function ‘i40evf_dev_interrupt_handler’: > /root/dpdk/drivers/net/i40e/i40e_ethdev_vf.c:1391: error: dereferencing pointer ‘v_msg’ does break strict-aliasing rules > /root/dpdk/drivers/net/i40e/i40e_ethdev_vf.c:1397: error: dereferencing pointer ‘v_msg’ does break strict-aliasing rules > /root/dpdk/drivers/net/i40e/i40e_ethdev_vf.c:1398: error: dereferencing pointer ‘v_msg’ does break strict-aliasing rules > /root/dpdk/drivers/net/i40e/i40e_ethdev_vf.c:1376: note: initialized from here > > > cc1: warnings being treated as errors > /root/dpdk/drivers/net/bnxt/bnxt_hwrm.c: In function ‘bnxt_hwrm_func_driver_unregister’: > /root/dpdk/drivers/net/bnxt/bnxt_hwrm.c:105: error: dereferencing pointer ‘req’ does break strict-aliasing rules > /root/dpdk/drivers/net/bnxt/bnxt_hwrm.c:66: note: initialized from here > > > cc1: warnings being treated as errors > /root/dpdk/drivers/net/qede/base/ecore_mcp.c: In function ‘ecore_mcp_nvm_rd_cmd’: > /root/dpdk/build/include/rte_memcpy.h:740: error: array subscript is above array bounds > /root/dpdk/drivers/net/qede/base/ecore_mcp.c: In function ‘ecore_mcp_nvm_wr_cmd’: > /root/dpdk/build/include/rte_memcpy.h:740: error: array subscript is above array bounds > At top level: > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" > > In doc/guides/rel_notes/supported_os.rst we still support > "Red Hat Enterprise Linux 6.5". > Most of these errors stems from the fact that in i40e there is alot of casting from structs which lay out data in typed members to structs which have flat memory buffers, which can cause problems if the alignment of the former isn't what you expect. You can disable strict aliasing if you want, but its a much better idea to fix it properly. The subscript above array options is pretty straightforward. rte_memcpy has a case statement that blocks memory copies to be more efficient. I would presume that there is a call site for a ecore read operation where the buffer array is smaller than the number of bytes copied, and the compiler noticed. > Do we still want to support it, or should we update the documentation to > remove it? > I think support probably doesn't matter, but regardless of that decision, you should likely look a bit more closely at these errors. Neil > Regards, > > -- > Nélio Laranjeiro > 6WIND >