From owner-freebsd-net@FreeBSD.ORG Tue Dec 30 12:17:40 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3143106566C; Tue, 30 Dec 2008 12:17:40 +0000 (UTC) (envelope-from yonyossef.lists@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id 09C658FC12; Tue, 30 Dec 2008 12:17:39 +0000 (UTC) (envelope-from yonyossef.lists@gmail.com) Received: by ug-out-1314.google.com with SMTP id 30so988488ugs.39 for ; Tue, 30 Dec 2008 04:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:references:subject :date:message-id:mime-version:content-type:content-transfer-encoding :x-mailer:thread-index:in-reply-to:x-mimeole; bh=/vG8e4XHdDsYsmN6vZKYRmT/Wl5Np2yc+XNzHXAaWeM=; b=v6lkn3u+bL3yTVje3v2KZOTkmauecoSlu4evObSAtn9yh8qeZgdoLzfnv/5URH9EWm jid/UDCsOn7kyAS1m98FKRAJ9wIy0oRJO+YchDaZxHNi3lyPJkNvx6KExj8IsqC/SAdB 5pYACHXtDhMMJ0z5KR0cewb3DdjCDJF3YjLXk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:references:subject:date:message-id:mime-version :content-type:content-transfer-encoding:x-mailer:thread-index :in-reply-to:x-mimeole; b=MdPxqMb+Gcc4JiWtG1dd9buiZaK6s/2vviVXo/PN5a/i2f3N+WfZNEEUzcrGl95XRa MUFSPH/iScECnBvDULEfF6bDQyFfL0B01dDVCUASj53tsilryMeAbWpl5HNU0Mn7CcRk lMJw28zmcHkdoMM2xfYCbbb9sEK5FAdSPqdSg= Received: by 10.66.245.2 with SMTP id s2mr10108539ugh.66.1230639458851; Tue, 30 Dec 2008 04:17:38 -0800 (PST) Received: from mtllpt03 (DSL212-235-20-133.bb.netvision.net.il [212.235.20.133]) by mx.google.com with ESMTPS id q40sm37412179ugc.1.2008.12.30.04.17.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 30 Dec 2008 04:17:37 -0800 (PST) From: "Yony Yossef" To: "'Robert Watson'" , "Yony Yossef" References: <20def4870812240600n6edbcad7k2100a0ccbe49f0dd@mail.gmail.com> Date: Tue, 30 Dec 2008 14:17:29 +0200 Message-ID: <000001c96a78$9a5b3c20$220f000a@mtl.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AclqA7ElGmqwGnwUQnqAaLLLK9ukzQAYa/Uw In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Cc: Eitan Shefi , freebsd-net@freebsd.org, Liran Liss , Yevgeny Petrilin Subject: RE: net.inet.udp.blackhole issue X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 12:17:40 -0000 > > I'm facing lots of UDP "Connection refused" errors while running > > multistream iperf test. Analyzing it with wireshark showed several > > "ICMP Port Unreachable" problems. > > > > I've overriden it with "sysctl net.inet.udp.blackhole=1", > but I'm not > > sure this is the correct thing to do, I feel like I've sweeped the > > problem under the carpet. > > > > PS - I see similar failures with TCP bidirectional iperf > test, it can > > also be overriden by "sysctl net.inet.tcp.blackhole=1". > > > > My question is - can it be a NIC problem? If so, how can a driver > > problem cause an iperf UDP socket to be in a "non listening state"? > > Hi Yony: > > This is fairly unlikely to be a NIC problem, although > anything is possible in software. I'm not familiar with > iperf, but generally speaking ICMP port unreachable is a > result of packets arriving at a closed socket; > net.inet.udp.blackhole suppresses that ICMP: > > if (udp_blackhole) > goto badheadlocked; > if (badport_bandlim(BANDLIM_ICMP_UNREACH) < 0) > goto badheadlocked; > *ip = save_ip; > ip->ip_len += iphlen; > icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PORT, 0, 0); > > I think I'd suspect an application bug/feature, in which > socket gets closed and opened during execution and once in a > while a datagram is delivered in that window. Perhaps > packets are being delivered with a non-trivial delay causing > them to arrive after the application has timed out waiting for it? > > Robert N M Watson > Computer Laboratory > University of Cambridge > I'm talking about a simple multistream UDP iperf test. One stream always works fine. More than one UDP stream has a chance of failing because of this problem. Wireshark analysis shows no such delay and no packet loss nor corruption, for what I've seen and understood. On the other hand, same test on a 1Gig NIC (I'm using a 10Gig) doesn't suffer from this issue without the blackhole assistance. Yony