All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Amos Kong <akong@redhat.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [KVM-AUTOTEST PATCH] tests/kvm: fix -net syntax for new qemu
Date: Tue, 14 Sep 2010 13:55:41 +0200	[thread overview]
Message-ID: <20100914115541.GB703@redhat.com> (raw)
In-Reply-To: <20100914005557.GA4221@z>

On Tue, Sep 14, 2010 at 08:55:57AM +0800, Amos Kong wrote:
> On Mon, Sep 13, 2010 at 07:43:22PM +0200, Michael S. Tsirkin wrote:
> > netdev option in new qemu is mutually exclusive with vlan.
> > Only pass vlan if netdev option is missing.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> This fix looks good for me.
> Reviewed-by: Amos Kong <akong@redhat.com>
> 
> BTW, we try to produce three kinds of cmdline, possible combinations:
> 1. Old way:   -net nic,model=e1000,vlan=1 -net tap,vlan=1
> 2. Semi-new:  -device e1000,vlan=1        -net tap,vlan=1
> 3. Best way:  -netdev type=tap,id=netdev1 -device e1000,id=netdev1
> 
> If you think this is good, I'll sent a patch to upstream.

I don't think we care about the Semi-new way.

> > ---
> > 
> > diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
> > index bdc9aab..7e76ed5 100755
> > --- a/client/tests/kvm/kvm_vm.py
> > +++ b/client/tests/kvm/kvm_vm.py
> > @@ -235,9 +235,10 @@ class VM:
> >              return cmd
> >  
> >          def add_nic(help, vlan, model=None, mac=None, netdev_id=None):
> > -            cmd = " -net nic,vlan=%d" % vlan
> >              if has_option(help, "netdev"):
> > -                cmd +=",netdev=%s" % netdev_id
> > +                cmd = " -net nic,netdev=%s" % netdev_id
> > +            else:
> > +                cmd = " -net nic,vlan=%d" % vlan
> >              if model: cmd += ",model=%s" % model
> >              if mac: cmd += ",macaddr='%s'" % mac
> >              return cmd

  reply	other threads:[~2010-09-14 12:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 17:43 [KVM-AUTOTEST PATCH] tests/kvm: fix -net syntax for new qemu Michael S. Tsirkin
2010-09-14  0:55 ` Amos Kong
2010-09-14 11:55   ` Michael S. Tsirkin [this message]
2010-09-14  2:02 ` Lucas Meneghel Rodrigues

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=20100914115541.GB703@redhat.com \
    --to=mst@redhat.com \
    --cc=akong@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    /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.