qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "KONRAD Frédéric" <fred.konrad@greensocs.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: peter.maydell@linaro.org, aliguori@us.ibm.com,
	matrixs.zero@gmail.com, mark.burton@greensocs.com,
	qemu-devel@nongnu.org, cornelia.huck@de.ibm.com,
	akong@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-1.5 1/2] virtio-net: add virtio_net_set_netclient_name.
Date: Wed, 15 May 2013 15:28:28 +0200	[thread overview]
Message-ID: <51938D7C.8040603@greensocs.com> (raw)
In-Reply-To: <20130515131643.GB9923@stefanha-thinkpad.muc.redhat.com>

On 15/05/2013 15:16, Stefan Hajnoczi wrote:
> On Wed, May 15, 2013 at 02:12:49PM +0200, fred.konrad@greensocs.com wrote:
>> @@ -1315,8 +1338,17 @@ static int virtio_net_device_init(VirtIODevice *vdev)
>>       memcpy(&n->mac[0], &n->nic_conf.macaddr, sizeof(n->mac));
>>       n->status = VIRTIO_NET_S_LINK_UP;
>>   
>> -    n->nic = qemu_new_nic(&net_virtio_info, &n->nic_conf,
>> -                          object_get_typename(OBJECT(qdev)), qdev->id, n);
>> +    if (n->netclient_type) {
>> +        /*
>> +         * Happen when virtio_net_set_netclient_name has been called.
>> +         */
>> +        n->nic = qemu_new_nic(&net_virtio_info, &n->nic_conf,
>> +                              n->netclient_type, n->netclient_name, n);
>> +    } else {
>> +        n->nic = qemu_new_nic(&net_virtio_info, &n->nic_conf,
>> +                              object_get_typename(OBJECT(qdev)), qdev->id, n);
>> +    }
> Does the 'else' case ever happen?  In the next patch you update all
> callers to invoke virtio_net_set_netclient_name().
>

Yes, we made virtio-bus hot-plugguable for virtio-mmio, which won't work 
like pci, s390 or CCW.
So virtio_net_set_netclient_name will not be called in that case.

Maybe worth to remove it and push it with virtio-mmio series? Peter?

Thanks,
Fred

  reply	other threads:[~2013-05-15 13:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 12:12 [Qemu-devel] [PATCH for-1.5 0/2] virtio-net: fix netclient id and type fred.konrad
2013-05-15 12:12 ` [Qemu-devel] [PATCH for-1.5 1/2] virtio-net: add virtio_net_set_netclient_name fred.konrad
2013-05-15 13:16   ` Stefan Hajnoczi
2013-05-15 13:28     ` KONRAD Frédéric [this message]
2013-05-15 12:12 ` [Qemu-devel] [PATCH for-1.5 2/2] virtio-net-x: forward the netclient name and type fred.konrad
2013-05-15 13:16 ` [Qemu-devel] [PATCH for-1.5 0/2] virtio-net: fix netclient id " Stefan Hajnoczi
2013-05-16 12:50 ` Anthony Liguori

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=51938D7C.8040603@greensocs.com \
    --to=fred.konrad@greensocs.com \
    --cc=akong@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=mark.burton@greensocs.com \
    --cc=matrixs.zero@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 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).