From: "Michael S. Tsirkin" <mst@redhat.com>
To: Victor Kaplansky <victork@redhat.com>
Cc: jasowang@redhat.com, qemu-devel@nongnu.org, mlspirat42@gmail.com
Subject: Re: [Qemu-devel] [PATCH] qemu-options: add documentation for using UDP unicast network backend.
Date: Mon, 19 Oct 2015 13:32:47 +0300 [thread overview]
Message-ID: <20151019132559-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1445248129-22483-1-git-send-email-victork@redhat.com>
On Mon, Oct 19, 2015 at 12:49:15PM +0300, Victor Kaplansky wrote:
> For a long time QEMU has had support for UDP unicast network
> backend, but manual was missing description and usage examples.
>
> This patch adds some more documentation and an example.
>
> Signed-off-by: Victor Kaplansky <victork@redhat.com>
Good point, thanks!
Minor comments:
> ---
> qemu-options.hx | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 2485b94..342bb14 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -1855,6 +1855,8 @@ qemu-system-i386 linux.img \
> -net socket,connect=127.0.0.1:1234
> @end example
>
> +
> +
> @item -netdev socket,id=@var{id}[,fd=@var{h}][,mcast=@var{maddr}:@var{port}[,localaddr=@var{addr}]]
> @itemx -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,mcast=@var{maddr}:@var{port}[,localaddr=@var{addr}]]
>
Why add this here? Probably safe to drop.
> @@ -1907,6 +1909,27 @@ qemu-system-i386 linux.img \
> -net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4
> @end example
>
> +@item -netdev socket,id=@var{id}[,fd=@var{h}][,udp=@var{rhost}:@var{rport}[,localaddr=@var{lhost}:@var{lport}]]
> +@itemx -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,udp=@var{host}:@var{rport}[,localaddr=@var{host}:@var{lport}]]
-net variant says "host" -netdev - lhost/rhost.
> +
> +Connect a VLAN @var{n} to a remote VLAN in another QEMU virtual
> +machine using a UDP tunnel. Use lport as local port and rport as
> +remote port of the tunnel.
the local port/the remote port
Pls document lhost/rhost as well.
> The two QEMU
QEMU instances
>can be running on
> +different hosts.
There are no "the two QEMU" so far.
Should this come after the examples?
> Use @option{fd=h} to specify an already opened
> +UDP socket.
> +
> +Example:
> +@example
> +# launch one QEMU instance
> +qemu-system-i386 linux.img \
> + -device virtio-net-pci,netdev=net0 \
> + -netdev socket,id=net0,udp=127.0.0.1:4444,localaddr=127.0.0.1:5555
> +# launch second QEMU instance sharing the network with the first one
"a second QEMU instance"
> +qemu-system-i386 linux.img \
> + -device virtio-net-pci,netdev=net0 \
> + -netdev socket,id=net0,udp=127.0.0.1:5555,localaddr=127.0.0.1:4444
localhost might be a bit clearer, this way people know names are OK to use, too.
It does work, doesn't it?
> +@end example
> +
> @item -netdev l2tpv3,id=@var{id},src=@var{srcaddr},dst=@var{dstaddr}[,srcport=@var{srcport}][,dstport=@var{dstport}],txsession=@var{txsession}[,rxsession=@var{rxsession}][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=@var{txcookie}][,rxcookie=@var{rxcookie}][,offset=@var{offset}]
> @itemx -net l2tpv3[,vlan=@var{n}][,name=@var{name}],src=@var{srcaddr},dst=@var{dstaddr}[,srcport=@var{srcport}][,dstport=@var{dstport}],txsession=@var{txsession}[,rxsession=@var{rxsession}][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=@var{txcookie}][,rxcookie=@var{rxcookie}][,offset=@var{offset}]
> Connect VLAN @var{n} to L2TPv3 pseudowire. L2TPv3 (RFC3391) is a popular
> --
> --Victor
prev parent reply other threads:[~2015-10-19 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 9:49 [Qemu-devel] [PATCH] qemu-options: add documentation for using UDP unicast network backend Victor Kaplansky
2015-10-19 10:32 ` Michael S. Tsirkin [this message]
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=20151019132559-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=jasowang@redhat.com \
--cc=mlspirat42@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=victork@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).