All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [Qemu-devel] [PULL 0/5] slirp updates
Date: Mon, 27 Feb 2017 09:08:52 +0000	[thread overview]
Message-ID: <20170227090851.GA2350@work-vm> (raw)
In-Reply-To: <CAFEAcA94FrJq7-i=z5FGXm2ar+xPKS+qoA+_E8y8b-Stomshig@mail.gmail.com>

* Peter Maydell (peter.maydell@linaro.org) wrote:
> On 26 February 2017 at 20:27, Samuel Thibault
> <samuel.thibault@ens-lyon.org> wrote:
> > The following changes since commit 685783c5b69c83c942d1fc21679311eeb8f79ab9:
> >
> >   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2017-02-26 16:38:40 +0000)
> >
> > are available in the git repository at:
> >
> >   http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
> >
> > for you to fetch changes up to c363a5b7f9ca9e802665587900b7ea1aefcf26ea:
> >
> >   slirp: VMStatify remaining except for loop (2017-02-26 21:16:38 +0100)
> >
> > ----------------------------------------------------------------
> > slirp updates
> >
> > ----------------------------------------------------------------
> > Dr. David Alan Gilbert (5):
> >       slirp: VMState conversion; tcpcb
> >       slirp: VMStatify sbuf
> >       slirp: Common lhost/fhost union
> >       slirp: VMStatify socket level
> >       slirp: VMStatify remaining except for loop
> 
> I'm afraid this doesn't build on OSX:
> 
> 
> /Users/pm215/src/qemu-for-merges/slirp/slirp.c:1291:9: error:
> 'uint16_t *' (aka 'unsigned short *') and 'typeof (((union
> slirp_sockaddr *)0)->ss.ss_family) *' (aka 'unsigned char *') are not
> pointers to compatible types
>         VMSTATE_SS_FAMILY(ss.ss_family, union slirp_sockaddr),
>         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Yes, we need to drop 4 and 5;  as per the separate thread the problem
is the BSDs just have a char for their ss_family.

Dave

> /Users/pm215/src/qemu-for-merges/slirp/slirp.c:1277:33: note: expanded
> from macro 'VMSTATE_SS_FAMILY'
> #define VMSTATE_SS_FAMILY(f, s) VMSTATE_UINT16(f, s)
>                                 ^~~~~~~~~~~~~~~~~~~~
> /Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:785:5:
> note: expanded from macro 'VMSTATE_UINT16'
>     VMSTATE_UINT16_V(_f, _s, 0)
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:764:5:
> note: expanded from macro 'VMSTATE_UINT16_V'
>     VMSTATE_SINGLE(_f, _s, _v, vmstate_info_uint16, uint16_t)
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> note: (skipping 1 expansions in backtrace; use
> -fmacro-backtrace-limit=0 to see all)
> /Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:300:21:
> note: expanded from macro 'VMSTATE_SINGLE_TEST'
>     .offset       = vmstate_offset_value(_state, _field, _type),     \
>                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:272:6:
> note: expanded from macro 'vmstate_offset_value'
>      type_check(_type, typeof_field(_state, _field)))
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/pm215/src/qemu-for-merges/include/qemu/compiler.h:86:35: note:
> expanded from macro 'type_check'
> #define type_check(t1,t2) ((t1*)0 - (t2*)0)
>                            ~~~~~~ ^ ~~~~~~
> 1 error generated.
> 
> In the OSX headers sockaddr_storage is:
> 
> struct sockaddr_storage {
>         __uint8_t       ss_len;         /* address length */
>         sa_family_t     ss_family;      /* [XSI] address family */
>         char                    __ss_pad1[_SS_PAD1SIZE];
>         __int64_t       __ss_align;     /* force structure storage alignment */
>         char                    __ss_pad2[_SS_PAD2SIZE];
> };
> 
> and sa_family_t is
> 
> typedef __uint8_t               sa_family_t;
> 
> (NetBSD also defines sa_family_t as an 8 bit type, and
> perhaps so do the other BSDs.)
> 
> I think we can't get away with having the on-the-wire
> type for this field be the same as the in-memory
> representation, since the on-the-wire rep. should
> be host-OS-independent...
> 
> thanks
> -- PMM
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2017-02-27  9:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-26 20:27 [Qemu-devel] [PULL 0/5] slirp updates Samuel Thibault
2017-02-26 20:27 ` [Qemu-devel] [PULL 1/5] slirp: VMState conversion; tcpcb Samuel Thibault
2017-02-26 20:27 ` [Qemu-devel] [PULL 2/5] slirp: VMStatify sbuf Samuel Thibault
2017-02-26 20:27 ` [Qemu-devel] [PULL 3/5] slirp: Common lhost/fhost union Samuel Thibault
2017-02-26 20:27 ` [Qemu-devel] [PULL 4/5] slirp: VMStatify socket level Samuel Thibault
2017-02-26 20:27 ` [Qemu-devel] [PULL 5/5] slirp: VMStatify remaining except for loop Samuel Thibault
2017-02-26 20:37 ` [Qemu-devel] [PULL 0/5] slirp updates no-reply
2017-02-26 22:38 ` Peter Maydell
2017-02-27  9:08   ` Dr. David Alan Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-06-08  6:13 Samuel Thibault
2018-06-08  6:20 ` no-reply
2018-06-08 10:40 ` Peter Maydell
2018-01-14 17:20 Samuel Thibault
2018-01-15 11:23 ` Peter Maydell
2016-03-28 23:28 Samuel Thibault
2016-03-29 18:54 ` Peter Maydell

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=20170227090851.GA2350@work-vm \
    --to=dgilbert@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.