Patchwork doc: document -netdev hubport

login
register
mail settings
Submitter Stefan Hajnoczi
Date Feb. 20, 2013, 10:03 a.m.
Message ID <1361354580-20760-1-git-send-email-stefanha@redhat.com>
Download mbox | patch
Permalink /patch/222028/
State New
Headers show

Comments

Stefan Hajnoczi - Feb. 20, 2013, 10:03 a.m.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 qemu-options.hx | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Laszlo Ersek - Feb. 20, 2013, 4:21 p.m.
On 02/20/13 11:03, Stefan Hajnoczi wrote:
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  qemu-options.hx | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 4bc9c85..c77c43e 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -1404,7 +1404,8 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
>  #ifdef CONFIG_VDE
>      "vde|"
>  #endif
> -    "socket],id=str[,option][,option][,...]\n", QEMU_ARCH_ALL)
> +    "socket|"
> +    "hubport],id=str[,option][,option][,...]\n", QEMU_ARCH_ALL)
>  STEXI
>  @item -net nic[,vlan=@var{n}][,macaddr=@var{mac}][,model=@var{type}] [,name=@var{name}][,addr=@var{addr}][,vectors=@var{v}]
>  @findex -net
> @@ -1726,6 +1727,14 @@ vde_switch -F -sock /tmp/myswitch
>  qemu-system-i386 linux.img -net nic -net vde,sock=/tmp/myswitch
>  @end example
>  
> +@item -netdev hubport,id=@var{id},hubid=@var{hubid}
> +
> +Create a hub port on QEMU "vlan" @var{hubid}.  This syntax is an alterative to

Typo:
- alterative
- alternative

> +the -net @option{vlan} argument and can be used to connect a NIC specified with
> +-device to a QEMU "vlan".

Can we say

    [...] with -device netdev=@var{id} to a QEMU "vlan"

or is the netdev= optarg obvious? (It's just the generic dev -> netdev
reference.)

Thanks
Laszlo
Stefan Hajnoczi - Feb. 21, 2013, 8:26 a.m.
On Wed, Feb 20, 2013 at 05:21:24PM +0100, Laszlo Ersek wrote:
> On 02/20/13 11:03, Stefan Hajnoczi wrote:
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > ---
> >  qemu-options.hx | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> > 
> > diff --git a/qemu-options.hx b/qemu-options.hx
> > index 4bc9c85..c77c43e 100644
> > --- a/qemu-options.hx
> > +++ b/qemu-options.hx
> > @@ -1404,7 +1404,8 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
> >  #ifdef CONFIG_VDE
> >      "vde|"
> >  #endif
> > -    "socket],id=str[,option][,option][,...]\n", QEMU_ARCH_ALL)
> > +    "socket|"
> > +    "hubport],id=str[,option][,option][,...]\n", QEMU_ARCH_ALL)
> >  STEXI
> >  @item -net nic[,vlan=@var{n}][,macaddr=@var{mac}][,model=@var{type}] [,name=@var{name}][,addr=@var{addr}][,vectors=@var{v}]
> >  @findex -net
> > @@ -1726,6 +1727,14 @@ vde_switch -F -sock /tmp/myswitch
> >  qemu-system-i386 linux.img -net nic -net vde,sock=/tmp/myswitch
> >  @end example
> >  
> > +@item -netdev hubport,id=@var{id},hubid=@var{hubid}
> > +
> > +Create a hub port on QEMU "vlan" @var{hubid}.  This syntax is an alterative to
> 
> Typo:
> - alterative
> - alternative
> 
> > +the -net @option{vlan} argument and can be used to connect a NIC specified with
> > +-device to a QEMU "vlan".
> 
> Can we say
> 
>     [...] with -device netdev=@var{id} to a QEMU "vlan"
> 
> or is the netdev= optarg obvious? (It's just the generic dev -> netdev
> reference.)

Good points, thanks.  I'll send a v2.

Stefan

Patch

diff --git a/qemu-options.hx b/qemu-options.hx
index 4bc9c85..c77c43e 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1404,7 +1404,8 @@  DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
 #ifdef CONFIG_VDE
     "vde|"
 #endif
-    "socket],id=str[,option][,option][,...]\n", QEMU_ARCH_ALL)
+    "socket|"
+    "hubport],id=str[,option][,option][,...]\n", QEMU_ARCH_ALL)
 STEXI
 @item -net nic[,vlan=@var{n}][,macaddr=@var{mac}][,model=@var{type}] [,name=@var{name}][,addr=@var{addr}][,vectors=@var{v}]
 @findex -net
@@ -1726,6 +1727,14 @@  vde_switch -F -sock /tmp/myswitch
 qemu-system-i386 linux.img -net nic -net vde,sock=/tmp/myswitch
 @end example
 
+@item -netdev hubport,id=@var{id},hubid=@var{hubid}
+
+Create a hub port on QEMU "vlan" @var{hubid}.  This syntax is an alterative to
+the -net @option{vlan} argument and can be used to connect a NIC specified with
+-device to a QEMU "vlan".
+
+Note that only NICs can be connected to a hubport, other -netdevs cannot.
+
 @item -net dump[,vlan=@var{n}][,file=@var{file}][,len=@var{len}]
 Dump network traffic on VLAN @var{n} to file @var{file} (@file{qemu-vlan0.pcap} by default).
 At most @var{len} bytes (64k by default) per packet are stored. The file format is