From patchwork Mon Jun 29 08:04:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 1188 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.27.255.55]) by backend30.mail.ord1d.rsapps.net with LMTP id uB3RMLUw+l6EFQAAIUCqbw for ; Mon, 29 Jun 2020 14:19:33 -0400 Received: from proxy8.mail.iad3a.rsapps.net ([172.27.255.55]) by director12.mail.ord1d.rsapps.net with LMTP id gA7uLbUw+l4ZfwAAIasKDg ; Mon, 29 Jun 2020 14:19:33 -0400 Received: from smtp19.gate.iad3a ([172.27.255.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy8.mail.iad3a.rsapps.net with LMTP id yLojJ7Uw+l69DgAAsBr/qg ; Mon, 29 Jun 2020 14:19:33 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp19.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=greenie.muc.de X-Suspicious-Flag: YES X-Classification-ID: 1437da8a-ba35-11ea-b03f-5254005d39f2-1-1 Received: from [216.105.38.7] ([216.105.38.7:55474] helo=lists.sourceforge.net) by smtp19.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id D5/25-00528-4B03AFE5; Mon, 29 Jun 2020 14:19:33 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jpyMj-0000Zk-4y; Mon, 29 Jun 2020 18:18:49 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpyMh-0000Zb-Ly for openvpn-devel@lists.sourceforge.net; Mon, 29 Jun 2020 18:18:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ey0kK8ytFTWE4MnNhWzvnUY5zvpJ+5Gh6+zGKW9QOdM=; b=Uav2udeXzHYh1UPqMUgxm+cTvk AxjVl3XMNps+v82yXkkp2iHmjdMaoaRPyLSrZsz2IXXngIoB1dZ5mrIW34YbwfBYn+VMmW0MGMqrS SezuM7VD0FdVU9pKK7U7M2R02xQ4mYtDt7agb9OAnHxxli737PPT0QvK1x2t9UtnhzMY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=Ey0kK8ytFTWE4MnNhWzvnUY5zvpJ+5Gh6+zGKW9QOdM=; b=k 7KYS7UyPx0j48Y14inr331wvJqY/xIooJVKQscVCeCvbqJI3btwN2xuq1MQZTwsMdw8wHTnjwdETd azFzStfNJGXK9mGgWWM+S1UdABLPlL18yAxC1pbOHturPTenlOfl/dIaRqFXM1n8Cs4EzL0AQmwXx wuLA0mk+V+bFiGbE=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] helo=blue.greenie.muc.de) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jpyMe-005G99-VZ for openvpn-devel@lists.sourceforge.net; Mon, 29 Jun 2020 18:18:47 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.14.9/8.14.9) with ESMTP id 05TI48PC017721 for ; Mon, 29 Jun 2020 20:04:08 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.15.2/8.14.9/Submit) id 05TI48Kj017720 for openvpn-devel@lists.sourceforge.net; Mon, 29 Jun 2020 20:04:08 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 29 Jun 2020 20:04:05 +0200 Message-Id: <20200629180405.17671-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1jpyMe-005G99-VZ Subject: [Openvpn-devel] [PATCH] Linux: do not change --txqueuelen OS default if not configured. X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Remove default setting of "set txqueuelen to 100". This default dates back to the "pre git" times (before 2005) and might have been beneficial back then - nowadays, the Linux default is 500, and thus reducing(!) txqueuelen by-default can cause TX packet drops on the tun interface, and that's bad for throughput. This is a similar change to commit f0b64e5dc (remove setting of the socket send/receive buffers by default) - similar vintage of the existing code, similar motivation. Note: buffer length can be checked with "ip link show" (qlen NNN) See also: https://ivanvari.com/solving-openvpn-poor-throughput-and-packet-loss/ Signed-off-by: Gert Doering Acked-By: Arne Schwabe --- src/openvpn/options.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index c21ef56d..a40efd68 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -840,9 +840,6 @@ init_options(struct options *o, const bool init_gc) #ifdef ENABLE_FEATURE_TUN_PERSIST o->persist_mode = 1; #endif -#ifdef TARGET_LINUX - o->tuntap_options.txqueuelen = 100; -#endif #ifdef _WIN32 #if 0 o->tuntap_options.ip_win32_type = IPW32_SET_ADAPTIVE;