qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Samuel Thibault <samuel.thibault@gnu.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Programmingkid <programmingkidx@gmail.com>,
	"qemu-devel@nongnu.org qemu-devel" <qemu-devel@nongnu.org>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [Qemu-devel] SLIRP warning messages displayed while compiling
Date: Sat, 12 Aug 2017 07:09:48 -0500	[thread overview]
Message-ID: <2ec95b76-3904-2781-a5b1-702734dfabfe@redhat.com> (raw)
In-Reply-To: <20170812114728.cnikfuyke5dbrake@var.youpi.perso.aquilenet.fr>

[-- Attachment #1: Type: text/plain, Size: 844 bytes --]

On 08/12/2017 06:47 AM, Samuel Thibault wrote:
> Eric Blake, on sam. 12 août 2017 06:41:30 -0500, wrote:
>> Here's an idea:  Instead of using struct ip6 { ... } QEMU_PACKED, use
>>
>> struct ip6 {
>> ...
>> };
>> QEMU_BUG_ON(sizeof(struct ip6) != 32);
> 
> That's an interesting way indeed.  I however wonder whether there may be
> not-so-uncommon systems where the compiler aligns some fields just for
> performance or such.

If it does, the BUG_ON will flag it, and we'll deal with it as needed
for that platform, perhaps by adding:

...
}
#ifdef WEIRD_PLATFORM
  QEMU_PACKED
#endif
 ;
QEMU_BUG_ON(...);

But as long as the BUG_ON doesn't flag anything, we can use the struct
as-is.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2017-08-12 12:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 20:44 [Qemu-devel] SLIRP warning messages displayed while compiling Programmingkid
2017-08-11 21:58 ` Samuel Thibault
2017-08-12 10:53   ` Peter Maydell
2017-08-12 11:04     ` Samuel Thibault
2017-08-12 11:18       ` Peter Maydell
2017-08-12 11:29         ` Samuel Thibault
2017-08-12 11:41           ` Eric Blake
2017-08-12 11:47             ` Samuel Thibault
2017-08-12 12:09               ` Eric Blake [this message]
2017-08-12 15:38             ` Philippe Mathieu-Daudé
2017-08-14 16:05               ` Eric Blake

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=2ec95b76-3904-2781-a5b1-702734dfabfe@redhat.com \
    --to=eblake@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=peter.maydell@linaro.org \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@gnu.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).