* [Qemu-devel] [PATCH] tap: minor code cleanup
@ 2011-02-03 16:37 Michael S. Tsirkin
2011-02-08 8:41 ` Markus Armbruster
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2011-02-03 16:37 UTC (permalink / raw)
To: qemu-devel, Anthony Liguori
remove a confusing comment.
TAP_DEFAULT_SNDBUF 0 is later translated to INT_MAX, so
let's set that value directly.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
net/tap-linux.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/net/tap-linux.c b/net/tap-linux.c
index 00f84d4..b8c0f3b 100644
--- a/net/tap-linux.c
+++ b/net/tap-linux.c
@@ -84,13 +84,8 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
* Unfortunately when it's enabled, and packets are sent
* to other guests on the same host, the receiver
* can lock up the transmitter indefinitely.
- *
- * To avoid packet loss, sndbuf should be set to a value lower than the tx
- * queue capacity of any destination network interface.
- * Ethernet NICs generally have txqueuelen=1000, so 1Mb is
- * a good value, given a 1500 byte MTU.
*/
-#define TAP_DEFAULT_SNDBUF 0
+#define TAP_DEFAULT_SNDBUF INT_MAX
int tap_set_sndbuf(int fd, QemuOpts *opts)
{
--
1.7.3.2.91.g446ac
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] tap: minor code cleanup
2011-02-03 16:37 [Qemu-devel] [PATCH] tap: minor code cleanup Michael S. Tsirkin
@ 2011-02-08 8:41 ` Markus Armbruster
0 siblings, 0 replies; 2+ messages in thread
From: Markus Armbruster @ 2011-02-08 8:41 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
"Michael S. Tsirkin" <mst@redhat.com> writes:
> remove a confusing comment.
> TAP_DEFAULT_SNDBUF 0 is later translated to INT_MAX, so
> let's set that value directly.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> net/tap-linux.c | 7 +------
> 1 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/net/tap-linux.c b/net/tap-linux.c
> index 00f84d4..b8c0f3b 100644
> --- a/net/tap-linux.c
> +++ b/net/tap-linux.c
> @@ -84,13 +84,8 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
> * Unfortunately when it's enabled, and packets are sent
> * to other guests on the same host, the receiver
> * can lock up the transmitter indefinitely.
> - *
> - * To avoid packet loss, sndbuf should be set to a value lower than the tx
> - * queue capacity of any destination network interface.
> - * Ethernet NICs generally have txqueuelen=1000, so 1Mb is
> - * a good value, given a 1500 byte MTU.
> */
> -#define TAP_DEFAULT_SNDBUF 0
> +#define TAP_DEFAULT_SNDBUF INT_MAX
>
> int tap_set_sndbuf(int fd, QemuOpts *opts)
> {
Can't comment on whether the comment should stay or go, but what about
tap_set_sndbuf()'s
if (!sndbuf) {
sndbuf = INT_MAX;
}
Shouldn't that assign TAP_DEFAULT_SNDBUF now?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-08 8:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-03 16:37 [Qemu-devel] [PATCH] tap: minor code cleanup Michael S. Tsirkin
2011-02-08 8:41 ` Markus Armbruster
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).