From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC3Ss-0001iu-S7 for qemu-devel@nongnu.org; Wed, 30 Nov 2016 06:54:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC3So-0004oY-6L for qemu-devel@nongnu.org; Wed, 30 Nov 2016 06:54:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36410) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cC3So-0004lX-0d for qemu-devel@nongnu.org; Wed, 30 Nov 2016 06:54:14 -0500 Date: Wed, 30 Nov 2016 11:54:08 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20161130115408.GB6043@work-vm> References: <20161123185258.771-1-dgilbert@redhat.com> <20161123185258.771-5-dgilbert@redhat.com> <20161127151346.GP8854@var.home> <20161127152851.GA25452@var.home> <20161128090816.GA2148@work-vm> <20161128104843.GC2853@var> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161128104843.GC2853@var> Subject: Re: [Qemu-devel] [PATCH v2 4/5] slirp: VMStatify socket level List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Thibault Cc: qemu-devel@nongnu.org, quintela@redhat.com, amit.shah@redhat.com * Samuel Thibault (samuel.thibault@gnu.org) 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 / dgilbert@redhat.com / Manchester, UK