From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Reshma Pattan <reshma.pattan@intel.com>,
dev@dpdk.org, david.marchand@redhat.com,
bruce.richardson@intel.com
Subject: Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning
Date: Fri, 3 May 2019 08:56:30 +0100 [thread overview]
Message-ID: <70e60224-7002-5a7e-6c21-a36fc097283a@intel.com> (raw)
In-Reply-To: <20190502115406.783df5b0@hermes.lan>
On 02-May-19 7:54 PM, Stephen Hemminger wrote:
> On Thu, 2 May 2019 16:53:50 +0100
> "Burakov, Anatoly" <anatoly.burakov@intel.com> 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
next prev parent reply other threads:[~2019-05-03 7:56 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-02 9:33 [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30 Reshma Pattan
2019-05-02 9:33 ` Reshma Pattan
2019-05-02 10:07 ` David Marchand
2019-05-02 10:07 ` David Marchand
2019-05-02 13:26 ` Bruce Richardson
2019-05-02 13:26 ` Bruce Richardson
2019-05-02 13:30 ` David Marchand
2019-05-02 13:30 ` David Marchand
2019-05-02 13:35 ` Pattan, Reshma
2019-05-02 13:35 ` Pattan, Reshma
2019-05-02 14:13 ` [dpdk-dev] [PATCH v2] mk: report address of packed member as warning Reshma Pattan
2019-05-02 14:13 ` Reshma Pattan
2019-05-02 14:24 ` David Marchand
2019-05-02 14:24 ` David Marchand
2019-05-02 14:41 ` Bruce Richardson
2019-05-02 14:41 ` Bruce Richardson
2019-05-02 14:48 ` David Marchand
2019-05-02 14:48 ` David Marchand
2019-05-02 15:53 ` Burakov, Anatoly
2019-05-02 15:53 ` Burakov, Anatoly
2019-05-02 18:54 ` Stephen Hemminger
2019-05-02 18:54 ` Stephen Hemminger
2019-05-03 7:56 ` Burakov, Anatoly [this message]
2019-05-03 7:56 ` Burakov, Anatoly
2019-05-02 15:00 ` [dpdk-dev] [PATCH] mk: disable warning with gcc 9 on Fedora 30 David Marchand
2019-05-02 15:00 ` David Marchand
2019-05-02 15:56 ` Thomas Monjalon
2019-05-02 15:56 ` Thomas Monjalon
2019-05-03 16:01 ` Jerin Jacob Kollanukkaran
2019-05-03 16:01 ` Jerin Jacob Kollanukkaran
2019-05-03 16:25 ` Bruce Richardson
2019-05-03 16:25 ` Bruce Richardson
2019-05-03 16:28 ` Richardson, Bruce
2019-05-03 16:28 ` Richardson, Bruce
2019-05-03 17:24 ` [dpdk-dev] [EXT] " Jerin Jacob Kollanukkaran
2019-05-03 17:24 ` Jerin Jacob Kollanukkaran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70e60224-7002-5a7e-6c21-a36fc097283a@intel.com \
--to=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=reshma.pattan@intel.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).