From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Blake Subject: Re: [Qemu-devel] [PATCH v7 11/15] qapi: Change Netdev into a flat union Date: Thu, 16 Jun 2016 08:35:06 -0600 Message-ID: <5762B91A.2070002@redhat.com> References: <1463784024-17242-1-git-send-email-eblake@redhat.com> <1463784024-17242-12-git-send-email-eblake@redhat.com> <87porh46n3.fsf@dusky.pond.sub.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1316300485155664000==" Return-path: In-Reply-To: <87porh46n3.fsf@dusky.pond.sub.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Markus Armbruster Cc: Peter Maydell , "Michael S. Tsirkin" , Jason Wang , qemu-devel@nongnu.org, Vincenzo Maffione , Luiz Capitulino , Max Filippov , Gerd Hoffmann , Dmitry Fleytman , "Edgar E. Iglesias" , Rob Herring , Stefano Stabellini , Alexander Graf , Scott Feldman , =?UTF-8?B?S8WRdsOhZ8OzLCBab2x0w6Fu?= , Anthony Perard , Samuel Thibault , Jiri Pirko , Alistair Francis , Beniamino Galvani , "open list:Musicpal" , Jan Kiszka Scott List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============1316300485155664000== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vDwiQ2hAeQ6mltoJVhKrjVpJMtnu63F2K" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vDwiQ2hAeQ6mltoJVhKrjVpJMtnu63F2K Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/16/2016 07:15 AM, Markus Armbruster wrote: > Eric Blake writes: >=20 >> From: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n >> >> Except qapi-schema.json, this patch was generated by: >> >> find . -name .git -prune -o -type f \! -name '*~' -print0 | \ >> xargs -0 sed -i \ >> -e 's/NetClientOptionsKind/NetClientDriver/g' \ >> -e 's/NET_CLIENT_OPTIONS_KIND_/NET_CLIENT_DRIVER_/g' \ >> -e 's/netdev->opts/netdev/g' >=20 > Uh, this is prone to descend into build trees and edit random crap. I > used >=20 > $ sed -i -e ... `git-ls-tree -r HEAD | awk '$2 =3D=3D "blob" { prin= t $4 }'` >=20 > to verify this commit. Differences noted inline. >=20 > I additionally get: >=20 > diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c > index 692283f..825f0ba 100644 > --- a/hw/net/e1000e.c > +++ b/hw/net/e1000e.c > @@ -226,7 +226,7 @@ e1000e_set_link_status(NetClientState *nc) > } >=20 > static NetClientInfo net_e1000e_info =3D { > - .type =3D NET_CLIENT_OPTIONS_KIND_NIC, > + .type =3D NET_CLIENT_DRIVER_NIC, > .size =3D sizeof(NICState), > .can_receive =3D e1000e_nc_can_receive, > .receive =3D e1000e_nc_receive, >=20 > Rebase needed? Unfortunately yes. This patch has been under a LOT of churn since it was first written; it may be better to just redo it from scratch and claim ownership myself, since it hardly resembles Zolt=C3=A1n's original submis= sion (but of course, give him credit for the idea). >=20 >> index f8a500f..89a149b 100644 >> --- a/net/dump.c >> +++ b/net/dump.c >> @@ -172,7 +172,7 @@ static void dumpclient_cleanup(NetClientState *nc)= >> } >> >> static NetClientInfo net_dump_info =3D { >> - .type =3D NET_CLIENT_OPTIONS_KIND_DUMP, >> + .type =3D NET_CLIENT_DRIVER_DUMP, >> .size =3D sizeof(DumpNetClient), >> .receive =3D dumpclient_receive, >> .receive_iov =3D dumpclient_receive_iov, >> @@ -189,8 +189,8 @@ int net_init_dump(const Netdev *netdev, const char= *name, >> NetClientState *nc; >> DumpNetClient *dnc; >> >> - assert(netdev->opts->type =3D=3D NET_CLIENT_OPTIONS_KIND_DUMP); >> - dump =3D netdev->opts->u.dump.data; >> + assert(netdev->type =3D=3D NET_CLIENT_DRIVER_DUMP); >> + dump =3D &netdev->u.dump; >=20 > sed turns this into >=20 > dump =3D netdev->u.dump.data; >=20 > Is this part of the manual changes? More of the same below. >=20 The original sed script is so distant from the actual changes that it's not worth mentioning the sed script in the commit message any more. >> >> assert(peer); >> >=20 > Another possible case of "rebase needed": >=20 > diff --git a/net/filter.c b/net/filter.c > index 8ac79f3..888fe6d 100644 > --- a/net/filter.c > +++ b/net/filter.c > @@ -201,7 +201,7 @@ static void netfilter_complete(UserCreatable *uc,= Error **errp) > } >=20 > queues =3D qemu_find_net_clients_except(nf->netdev_id, ncs, > - NET_CLIENT_OPTIONS_KIND_NI= C, > + NET_CLIENT_DRIVER_NIC, > MAX_QUEUE_NUM); Yep. Thanks for researching. >> >> static int net_client_init1(const void *object, int is_netdev, Error = **errp) >> { >=20 > Multiple differences in this function. Manual? Yes. >> @@ -47,7 +47,7 @@ static void vhost_user_stop(int queues, NetClientSta= te *ncs[]) >> int i; >> >> for (i =3D 0; i < queues; i++) { >> - assert (ncs[i]->info->type =3D=3D NET_CLIENT_OPTIONS_KIND_VHO= ST_USER); >> + assert(ncs[i]->info->type =3D=3D NET_CLIENT_DRIVER_VHOST_USER= ); >=20 > Manual whitespace cleanup. Okay. >=20 And necessary to shut up checkpatch. I really get to rewrite the commit message to something better for v8, don't I. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --vDwiQ2hAeQ6mltoJVhKrjVpJMtnu63F2K Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXYrkaAAoJEKeha0olJ0Nq+zgIAKt6xW2Ym0b4Kyvae7OPio/t sxGSM5OeVVPYE+xciFt64Agdb2OXF4qbzZ+EMr/h7cVqcHs/QaHqZa5/fv1uWEcM F3e5adA9vdqGYtbO/4StYv8rdC4p8Dr2REvXhULtwCxzPYltT78N0Fokb3pn7nR8 dPl8VjDEh7hdtt1qXyGghP0aOvxpPjhcExtWHg1p3QLpAAvqyERBxh8LGzvgrTdT ddJU0gK3QAuXAFsr7wx26uMPTf5ssR+H7IoNajXDkZDhyozfLmllNikPfKdtTPVU wnkycHH+7yOoegy1UyjK8aef+w7YxQf4Dmxcw/55is0tAQrunO+quqjqIhbVEWQ= =3UVR -----END PGP SIGNATURE----- --vDwiQ2hAeQ6mltoJVhKrjVpJMtnu63F2K-- --===============1316300485155664000== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============1316300485155664000==--