* [KVM-AUTOTEST PATCH] tests/kvm: fix -net syntax for new qemu
@ 2010-09-13 17:43 Michael S. Tsirkin
2010-09-14 0:55 ` Amos Kong
2010-09-14 2:02 ` Lucas Meneghel Rodrigues
0 siblings, 2 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2010-09-13 17:43 UTC (permalink / raw)
To: autotest, kvm
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [KVM-AUTOTEST PATCH] tests/kvm: fix -net syntax for new qemu
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
2010-09-14 2:02 ` Lucas Meneghel Rodrigues
1 sibling, 1 reply; 4+ messages in thread
From: Amos Kong @ 2010-09-14 0:55 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: autotest, kvm
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.
> ---
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [KVM-AUTOTEST PATCH] tests/kvm: fix -net syntax for new qemu
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 2:02 ` Lucas Meneghel Rodrigues
1 sibling, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2010-09-14 2:02 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: autotest, kvm
On Mon, 2010-09-13 at 19:43 +0200, Michael S. Tsirkin wrote:
> netdev option in new qemu is mutually exclusive with vlan.
> Only pass vlan if netdev option is missing.
Looks good to me, applied, thanks!
http://autotest.kernel.org/changeset/4783
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> ---
>
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [KVM-AUTOTEST PATCH] tests/kvm: fix -net syntax for new qemu
2010-09-14 0:55 ` Amos Kong
@ 2010-09-14 11:55 ` Michael S. Tsirkin
0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2010-09-14 11:55 UTC (permalink / raw)
To: Amos Kong; +Cc: autotest, kvm
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-14 12:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2010-09-14 2:02 ` Lucas Meneghel Rodrigues
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.