All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: vyasevic@redhat.com
Cc: Jason Wang <jasowang@redhat.com>,
	qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-1.7] qdev-properties-system.c: Allow vlan or netdev for -device, not both
Date: Thu, 21 Nov 2013 21:40:44 +0100	[thread overview]
Message-ID: <528E6FCC.2060804@redhat.com> (raw)
In-Reply-To: <528E636D.9090106@redhat.com>

Il 21/11/2013 20:47, Vlad Yasevich ha scritto:
> On 11/11/2013 02:50 AM, Paolo Bonzini wrote:
>> Il 11/11/2013 06:18, Jason Wang ha scritto:
>>> On 11/08/2013 10:13 AM, Vlad Yasevich wrote:
>>>> It is currently possible to specify things like:
>>>> 	-device e1000,netdev=foo,vlan=1
>>>> With this usage, whichever argument was specified last (vlan or netdev)
>>>> overwrites what was previousely set and results in a non-working
>>>> configuration.  Even worse, when used with multiqueue devices,
>>>> it causes a segmentation fault on exit in qemu_free_net_client.
>>>>
>>>> That patch treates the above command line options as invalid and
>>>> generates an error at start-up.
>>>>
>>>> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
>>>> ---
>>>>  hw/core/qdev-properties-system.c | 9 +++++++++
>>>>  1 file changed, 9 insertions(+)
>>>>
>>>> diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
>>>> index 0eada32..729efa8 100644
>>>> --- a/hw/core/qdev-properties-system.c
>>>> +++ b/hw/core/qdev-properties-system.c
>>>> @@ -205,6 +205,11 @@ static int parse_netdev(DeviceState *dev, const char *str, void **ptr)
>>>>              goto err;
>>>>          }
>>>>  
>>>> +        if (ncs[i]) {
>>>> +            ret = -EINVAL;
>>>> +            goto err;
>>>> +        }
>>>> +
>>>>          ncs[i] = peers[i];
>>>>          ncs[i]->queue_index = i;
>>>>      }
>>>> @@ -301,6 +306,10 @@ static void set_vlan(Object *obj, Visitor *v, void *opaque,
>>>>          *ptr = NULL;
>>>>          return;
>>>>      }
>>>> +    if (*ptr) {
>>>> +        error_set_from_qdev_prop_error(errp, -EINVAL, dev, prop, name);
>>>> +        return;
>>>> +    }
>>>>  
>>>>      hubport = net_hub_port_find(id);
>>>>      if (!hubport) {
>>>
>>> Acked-by: Jason Wang <jasowang@redhat.com>
>>
>> This patch is good for 1.7.
>>
>> Paolo
>>
> 
> Hi All
> 
> Just wondering what's to become of this patch?  It has an ACK, but has
> been abandoned.  It does a fix a crash in qemu.

I missed this when going through pending patches.  Stefan, are you
picking it up?

Paolo

  reply	other threads:[~2013-11-21 20:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08  2:13 [Qemu-devel] [PATCH] qdev-properties-system.c: Allow vlan or netdev for -device, not both Vlad Yasevich
2013-11-11  5:18 ` Jason Wang
2013-11-11  7:50   ` [Qemu-devel] [PATCH for-1.7] " Paolo Bonzini
2013-11-21 19:47     ` Vlad Yasevich
2013-11-21 20:40       ` Paolo Bonzini [this message]
2013-11-22  8:50 ` [Qemu-devel] [PATCH] " Stefan Hajnoczi

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=528E6FCC.2060804@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vyasevic@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.