From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Samuel Thibault <samuel.thibault@gnu.org>
Cc: qemu-devel@nongnu.org, quintela@redhat.com, amit.shah@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 4/5] slirp: VMStatify socket level
Date: Mon, 28 Nov 2016 09:08:16 +0000 [thread overview]
Message-ID: <20161128090816.GA2148@work-vm> (raw)
In-Reply-To: <20161127152851.GA25452@var.home>
* Samuel Thibault (samuel.thibault@gnu.org) wrote:
> Samuel Thibault, on Sun 27 Nov 2016 16:13:46 +0100, wrote:
> > Dr. David Alan Gilbert (git), on Wed 23 Nov 2016 18:52:57 +0000, wrote:
> > > +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_END_OF_LIST()
> > > + }
> > > +};
> >
> > How will we be able to add the IPv6 case here?
>
> Reading again your previous post, it seemed it'd be in
> slirp_family_inet, but I don't immediately see how.
>
> Applying your patch for 2.9 would thus make porting the code to IPv6
> more difficult than how it is now, so I'm quite reluctant :)
>
> Could you perhaps simply add the IPv6 case in your patch series already?
> It shouldn't be much work for you who actually know how the VMSTATE
> machinery is supposed to work (I guess the amount of people who care
> about slirp *and* know about VMSTATE is extremely small), and a proof of
> concept for the portability to non-ipv4 addresse spaces.
The number of people who care about slirp, IPv6, VMState is even smaller :-)
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()
}
};
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.
Can you suggest an IPv6 command line for testing that ?
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2016-11-28 9:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 18:52 [Qemu-devel] [PATCH v2 0/5] SLIRP VMStatification [ for 2.9 ] Dr. David Alan Gilbert (git)
2016-11-23 18:52 ` [Qemu-devel] [PATCH v2 1/5] slirp: VMState conversion; tcpcb Dr. David Alan Gilbert (git)
2016-11-23 18:52 ` [Qemu-devel] [PATCH v2 2/5] slirp: VMStatify sbuf Dr. David Alan Gilbert (git)
2016-11-23 18:52 ` [Qemu-devel] [PATCH v2 3/5] slirp: Common lhost/fhost union Dr. David Alan Gilbert (git)
2016-11-23 18:52 ` [Qemu-devel] [PATCH v2 4/5] slirp: VMStatify socket level Dr. David Alan Gilbert (git)
2016-11-27 15:13 ` Samuel Thibault
2016-11-27 15:28 ` Samuel Thibault
2016-11-28 9:08 ` Dr. David Alan Gilbert [this message]
2016-11-28 10:48 ` Samuel Thibault
2016-11-30 11:54 ` Dr. David Alan Gilbert
2016-11-23 18:52 ` [Qemu-devel] [PATCH v2 5/5] slirp: VMStatify remaining except for loop Dr. David Alan Gilbert (git)
2016-11-29 8:31 ` [Qemu-devel] [PATCH v2 0/5] SLIRP VMStatification [ for 2.9 ] no-reply
2016-11-29 13:33 ` no-reply
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=20161128090816.GA2148@work-vm \
--to=dgilbert@redhat.com \
--cc=amit.shah@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--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 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.