[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/5] slirp: VMStatify socket level
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/5] slirp: VMStatify socket level |
Date: |
Wed, 30 Nov 2016 11:54:08 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
* Samuel Thibault (address@hidden) wrote:
> Hello,
>
> Dr. David Alan Gilbert, on Mon 28 Nov 2016 09:08:16 +0000, wrote:
> > Hmm, I don't really know IPv6 but I'm thinking this code will become
> > something like
> > the following (says he not knowing whether a scope-id or a flowinfo
> > is something that needs migrating) (untested):
> >
> >
> > static const VMStateDescription vmstate_slirp_socket_addr = {
> > .name = "slirp-socket-addr",
> > .version_id = 4,
> > .fields = (VMStateField[]) {
> > VMSTATE_UINT16(ss.ss_family, union slirp_sockaddr),
> > VMSTATE_UINT32_TEST(sin.sin_addr.s_addr, union slirp_sockaddr,
> > slirp_family_inet),
> > VMSTATE_UINT16_TEST(sin.sin_port, union slirp_sockaddr,
> > slirp_family_inet),
> >
> > VMSTATE_BUFFER_TEST(sin6.sin6_addr, union slirp_sockaddr,
> > slirp_family_inet6),
> > VMSTATE_UINT16_TEST(sin6.sin6_port, union slirp_sockaddr,
> > slirp_family_inet6),
> > VMSTATE_UINT32_TEST(sin6.sin6_flowinfo, union slirp_sockaddr,
> > slirp_family_inet6),
> > VMSTATE_UINT32_TEST(sin6.sin6_scope_id, union slirp_sockaddr,
> > slirp_family_inet6),
> >
> > VMSTATE_END_OF_LIST()
> > }
> > };
>
> Ok, that looks good :)
>
> > So to me that looks pretty clean, we need to add another slirp_family_inet6
> > test function, but then we just add the extra fields for the IPv6 stuff.
>
> Yes, now I see.
>
> > Can you suggest an IPv6 command line for testing that ?
>
> Well, it doesn't exist yet, that's the problem. And applying your patch
> would have made it to exist even harder, so that's why I was afraid.
>
> I would say that your patch should contain these IPv6 lines, but as
> comments since they are untested, for the person who will at some point
> want to implement the IPv6 case here.
OK, yes I can just add them as a comment and let someone who fixes
the rest of the IPv6 code turn it on.
Dave
> Samuel
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
[Qemu-devel] [PATCH v2 5/5] slirp: VMStatify remaining except for loop, Dr. David Alan Gilbert (git), 2016/11/23
[Qemu-devel] [PATCH v2 2/5] slirp: VMStatify sbuf, Dr. David Alan Gilbert (git), 2016/11/23
Re: [Qemu-devel] [PATCH v2 0/5] SLIRP VMStatification [ for 2.9 ], no-reply, 2016/11/29
Re: [Qemu-devel] [PATCH v2 0/5] SLIRP VMStatification [ for 2.9 ], no-reply, 2016/11/29