Re: [Qemu-devel] [PATCH v3] doc: document -netdev hubport

2013-02-25 Thread Stefan Hajnoczi
On Fri, Feb 22, 2013 at 09:49:46AM +0100, Stefan Hajnoczi wrote:
 Signed-off-by: Stefan Hajnoczi stefa...@redhat.com
 ---
  hmp-commands.hx |  2 +-
  qemu-options.hx | 11 ++-
  2 files changed, 11 insertions(+), 2 deletions(-)

Applied to my net tree:
https://github.com/stefanha/qemu/commits/net

Stefan



[Qemu-devel] [PATCH v3] doc: document -netdev hubport

2013-02-22 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi stefa...@redhat.com
---
 hmp-commands.hx |  2 +-
 qemu-options.hx | 11 ++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/hmp-commands.hx b/hmp-commands.hx
index 64008a9..c204d31 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1169,7 +1169,7 @@ ETEXI
 {
 .name   = netdev_add,
 .args_type  = netdev:O,
-.params = [user|tap|socket],id=str[,prop=value][,...],
+.params = [user|tap|socket|hubport],id=str[,prop=value][,...],
 .help   = add host network device,
 .mhandler.cmd = hmp_netdev_add,
 },
diff --git a/qemu-options.hx b/qemu-options.hx
index 4bc9c85..cd18ad1 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 alternative to
+the @code{-net @option{vlan}} argument and can be used to connect a NIC
+specified with @code{-device ...,netdev=@var{id}} 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
-- 
1.8.1.2




Re: [Qemu-devel] [PATCH v3] doc: document -netdev hubport

2013-02-22 Thread Laszlo Ersek
On 02/22/13 09:49, Stefan Hajnoczi wrote:
 Signed-off-by: Stefan Hajnoczi stefa...@redhat.com
 ---
  hmp-commands.hx |  2 +-
  qemu-options.hx | 11 ++-
  2 files changed, 11 insertions(+), 2 deletions(-)
 
 diff --git a/hmp-commands.hx b/hmp-commands.hx
 index 64008a9..c204d31 100644
 --- a/hmp-commands.hx
 +++ b/hmp-commands.hx
 @@ -1169,7 +1169,7 @@ ETEXI
  {
  .name   = netdev_add,
  .args_type  = netdev:O,
 -.params = [user|tap|socket],id=str[,prop=value][,...],
 +.params = [user|tap|socket|hubport],id=str[,prop=value][,...],
  .help   = add host network device,
  .mhandler.cmd = hmp_netdev_add,
  },
 diff --git a/qemu-options.hx b/qemu-options.hx
 index 4bc9c85..cd18ad1 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 alternative 
 to
 +the @code{-net @option{vlan}} argument and can be used to connect a NIC
 +specified with @code{-device ...,netdev=@var{id}} 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
 

Reviewed-by: Laszlo Ersek ler...@redhat.com