From patchwork Thu Feb 3 16:37:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 81679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 607A3B712B for ; Fri, 4 Feb 2011 03:41:03 +1100 (EST) Received: from localhost ([127.0.0.1]:60851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl2Eu-0003tT-JG for incoming@patchwork.ozlabs.org; Thu, 03 Feb 2011 11:41:00 -0500 Received: from [140.186.70.92] (port=51033 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl2C6-0002f0-71 for qemu-devel@nongnu.org; Thu, 03 Feb 2011 11:38:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pl2C4-0000oA-OB for qemu-devel@nongnu.org; Thu, 03 Feb 2011 11:38:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pl2C4-0000nZ-GB for qemu-devel@nongnu.org; Thu, 03 Feb 2011 11:38:04 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p13Gc2Yj000921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Feb 2011 11:38:03 -0500 Received: from redhat.com (vpn-200-12.tlv.redhat.com [10.35.200.12]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p13GbxvO005450; Thu, 3 Feb 2011 11:38:00 -0500 Date: Thu, 3 Feb 2011 18:37:48 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org, Anthony Liguori Message-ID: <20110203163748.GA10461@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Subject: [Qemu-devel] [PATCH] tap: minor code cleanup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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) {