diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-06-18 18:21:34 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-22 10:15:30 -0500 |
commit | 0df0ff6de70393680cea81ad696d9d74b75f88da (patch) | |
tree | 4e6c037340aa0c7d3430dae6bc169a4c49c589b1 /qemu-options.hx | |
parent | 4a77b25e2af0ccfa637c963f64a01468edcf94ac (diff) | |
download | qemu-0df0ff6de70393680cea81ad696d9d74b75f88da.tar.gz qemu-0df0ff6de70393680cea81ad696d9d74b75f88da.tar.bz2 qemu-0df0ff6de70393680cea81ad696d9d74b75f88da.zip |
net: add '-net tap,sndbuf=nbytes'
2.6.30 adds a new TUNSETSNDBUF ioctl() which allows a send buffer limit
for the tap device to be specified. When this limit is reached, a tap
write() will return EAGAIN and poll() will indicate the fd isn't
writable.
This allows people to tune their setups so as to avoid e.g. UDP packet
loss when the sending application in the guest out-runs the NIC in the
host.
There is no obviously sensible default setting - a suitable value
depends mostly on the capabilities of the physical NIC through which the
packets are being sent.
Also, note that when using a bridge with netfilter enabled, we currently
never get EAGAIN because netfilter causes the packet to be immediately
orphaned. Set /proc/sys/net/bridge/bridge nf-call-iptables to zero to
disable this behaviour.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r-- | qemu-options.hx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/qemu-options.hx b/qemu-options.hx index fdeda10884..503da332f9 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -747,12 +747,19 @@ DEF("net", HAS_ARG, QEMU_OPTION_net, "-net tap[,vlan=n][,name=str],ifname=name\n" " connect the host TAP network interface to VLAN 'n'\n" #else - "-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile]\n" + "-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile]" +#ifdef TUNSETSNDBUF + "[,sndbuf=nbytes]" +#endif + "\n" " connect the host TAP network interface to VLAN 'n' and use the\n" " network scripts 'file' (default=%s)\n" " and 'dfile' (default=%s);\n" " use '[down]script=no' to disable script execution;\n" " use 'fd=h' to connect to an already opened TAP interface\n" +#ifdef TUNSETSNDBUF + " use 'sndbuf=nbytes' to limit the size of the send buffer\n" +#endif #endif "-net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port]\n" " connect the vlan 'n' to another VLAN using a socket connection\n" |