xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	qemu-devel@nongnu.org, "Vincenzo Maffione" <v.maffione@gmail.com>,
	"Luiz Capitulino" <lcapitulino@redhat.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Dmitry Fleytman" <dmitry@daynix.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Rob Herring" <robh@kernel.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Alexander Graf" <agraf@suse.de>,
	"Scott Feldman" <sfeldma@gmail.com>,
	"Kővágó, Zoltán" <DirtY.iCE.hu@gmail.com>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	"Jiri Pirko" <jiri@resnulli.us>,
	"Alistair Francis" <alistair.francis@xilinx.com>,
	"Beniamino Galvani" <b.galvani@gmail.com>,
	"open list:Musicpal" <qemu-arm@nongnu.org>,
	"Jan Kiszka" <jan.kiszka@web.de>
Subject: Re: [Qemu-devel] [PATCH v7 11/15] qapi: Change Netdev into a flat union
Date: Thu, 16 Jun 2016 08:35:06 -0600	[thread overview]
Message-ID: <5762B91A.2070002@redhat.com> (raw)
In-Reply-To: <87porh46n3.fsf@dusky.pond.sub.org>


[-- Attachment #1.1: Type: text/plain, Size: 3924 bytes --]

On 06/16/2016 07:15 AM, Markus Armbruster wrote:
> Eric Blake <eblake@redhat.com> writes:
> 
>> From: Kővágó, Zoltán <dirty.ice.hu@gmail.com>
>>
>> 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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2016-06-16 14:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1463784024-17242-1-git-send-email-eblake@redhat.com>
2016-05-20 22:40 ` Eric Blake
2016-06-16 13:15   ` Markus Armbruster
2016-06-16 14:35     ` Eric Blake [this message]

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=5762B91A.2070002@redhat.com \
    --to=eblake@redhat.com \
    --cc=DirtY.iCE.hu@gmail.com \
    --cc=agraf@suse.de \
    --cc=alistair.francis@xilinx.com \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=b.galvani@gmail.com \
    --cc=dmitry@daynix.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=jan.kiszka@web.de \
    --cc=jasowang@redhat.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=robh@kernel.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=sfeldma@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=v.maffione@gmail.com \
    --subject='Re: [Qemu-devel] [PATCH v7 11/15] qapi: Change Netdev into a flat union' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).