[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Qemu-devel] [PATCH v7 11/15] qapi: Change Netdev into a flat union
On 06/16/2016 07:15 AM, Markus Armbruster wrote: > Eric Blake <eblake@xxxxxxxxxx> writes: > >> From: Kővágó, Zoltán <dirty.ice.hu@xxxxxxxxx> >> >> 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' > > Uh, this is prone to descend into build trees and edit random crap. I > used > > $ sed -i -e ... `git-ls-tree -r HEAD | awk '$2 == "blob" { print $4 }'` > > to verify this commit. Differences noted inline. > > I additionally get: > > 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) > } > > static NetClientInfo net_e1000e_info = { > - .type = NET_CLIENT_OPTIONS_KIND_NIC, > + .type = NET_CLIENT_DRIVER_NIC, > .size = sizeof(NICState), > .can_receive = e1000e_nc_can_receive, > .receive = e1000e_nc_receive, > > 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án's original submission (but of course, give him credit for the idea). > >> 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 = { >> - .type = NET_CLIENT_OPTIONS_KIND_DUMP, >> + .type = NET_CLIENT_DRIVER_DUMP, >> .size = sizeof(DumpNetClient), >> .receive = dumpclient_receive, >> .receive_iov = 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 == NET_CLIENT_OPTIONS_KIND_DUMP); >> - dump = netdev->opts->u.dump.data; >> + assert(netdev->type == NET_CLIENT_DRIVER_DUMP); >> + dump = &netdev->u.dump; > > sed turns this into > > dump = netdev->u.dump.data; > > Is this part of the manual changes? More of the same below. > 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); >> > > Another possible case of "rebase needed": > > 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) > } > > queues = qemu_find_net_clients_except(nf->netdev_id, ncs, > - NET_CLIENT_OPTIONS_KIND_NIC, > + NET_CLIENT_DRIVER_NIC, > MAX_QUEUE_NUM); Yep. Thanks for researching. >> >> static int net_client_init1(const void *object, int is_netdev, Error **errp) >> { > > Multiple differences in this function. Manual? Yes. >> @@ -47,7 +47,7 @@ static void vhost_user_stop(int queues, NetClientState >> *ncs[]) >> int i; >> >> for (i = 0; i < queues; i++) { >> - assert (ncs[i]->info->type == NET_CLIENT_OPTIONS_KIND_VHOST_USER); >> + assert(ncs[i]->info->type == NET_CLIENT_DRIVER_VHOST_USER); > > Manual whitespace cleanup. Okay. > And necessary to shut up checkpatch. I really get to rewrite the commit message to something better for v8, don't I. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |