From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A74B5A0AC5 for ; Fri, 3 May 2019 09:56:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9C5332B89; Fri, 3 May 2019 09:56:36 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id AB1332B84 for ; Fri, 3 May 2019 09:56:34 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2019 00:56:33 -0700 X-ExtLoop1: 1 Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.251.90.134]) ([10.251.90.134]) by orsmga002.jf.intel.com with ESMTP; 03 May 2019 00:56:31 -0700 To: Stephen Hemminger Cc: Reshma Pattan , dev@dpdk.org, david.marchand@redhat.com, bruce.richardson@intel.com References: <20190502093334.7546-1-reshma.pattan@intel.com> <20190502141316.25907-1-reshma.pattan@intel.com> <276195ae-1dcc-cfff-09af-b5c904fccce0@intel.com> <20190502115406.783df5b0@hermes.lan> From: "Burakov, Anatoly" Message-ID: <70e60224-7002-5a7e-6c21-a36fc097283a@intel.com> Date: Fri, 3 May 2019 08:56:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190502115406.783df5b0@hermes.lan> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning 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" Message-ID: <20190503075630.V-BYgcioEXsPlm7jEOXLiXgydWfRsmRD2faSV9ODwZI@z> On 02-May-19 7:54 PM, Stephen Hemminger wrote: > On Thu, 2 May 2019 16:53:50 +0100 > "Burakov, Anatoly" wrote: > >> On 02-May-19 3:13 PM, Reshma Pattan wrote: >>> gcc 9 on Fedora 30 gives an error >>> "taking address of packed member may result in an >>> unaligned pointer value" for -Waddress-of-packed-member. >>> >>> Report it as warning instead of error to fix the build. >>> >>> Snippet of build before fix >>> ...lib/librte_eal/linux/eal/eal_memalloc.c: In function ‘alloc_seg_walk’: >>> ...lib/librte_eal/linux/eal/eal_memalloc.c:768:12: error: taking address >>> of packed member of ‘struct rte_mem_config’ may result in an unaligned >>> pointer value [-Werror=address-of-packed-member] >>> 768 | cur_msl = &mcfg->memsegs[msl_idx]; >>> | ^~~~~~~~~~~~~~~~~~~~~~~ >>> >>> Snippet of build after fix >>> ..lib/librte_eal/linux/eal/eal_memory.c: In function ‘remap_segment’: >>> ..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address >>> of packed member of ‘struct rte_mem_config’ may result in an unaligned >>> pointer value [-Waddress-of-packed-member] >>> 685 | msl = &mcfg->memsegs[msl_idx]; >>> >> >> Fixing these would require an ABI break, because these are exposed >> externally. Should we submit a deprecation notice for EAL? > > > Ideally mem config and related structures would not be exposed in the > API. Like lcore_config and eal_config it should be eal_private > In a perfect world, that would've been the case. However, these are in shared memory structures that are used for multiprocess synchronization. -- Thanks, Anatoly