From owner-freebsd-stable@FreeBSD.ORG Fri May 13 19:55:30 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F4A7106566B for ; Fri, 13 May 2011 19:55:30 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 484C18FC0C for ; Fri, 13 May 2011 19:55:30 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id p4DJtQ79094002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 May 2011 14:55:26 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.4) with ESMTP id p4DJtQE3048503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 May 2011 14:55:26 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.4/Submit) id p4DJtPjv048502; Fri, 13 May 2011 14:55:25 -0500 (CDT) (envelope-from dan) Date: Fri, 13 May 2011 14:55:25 -0500 From: Dan Nelson To: Bartosz Woronicz Message-ID: <20110513195524.GC7043@dan.emsphone.com> References: <4DCD2881.4020402@korbank.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DCD2881.4020402@korbank.pl> X-OS: FreeBSD 8.2-PRERELEASE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Fri, 13 May 2011 14:55:27 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: freebsd-stable@freebsd.org Subject: Re: Unstable ARP responses times X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2011 19:55:30 -0000 In the last episode (May 13), Bartosz Woronicz said: > Since I moved from 7.3-stable to 8.2-stable I go strange long responses > of arp, with arping. > I.e. > root@Korbotron82|pts/3|13:35:35|/home/mastier # arping -i vlan92 > 79.110.194.140 > ARPING 79.110.194.140 > 60 bytes from 00:15:17:a2:ea:38 (79.110.194.140): index=0 time=1.579 msec > 60 bytes from 00:15:17:a2:ea:38 (79.110.194.140): index=1 time=653.326 msec > 60 bytes from 00:15:17:a2:ea:38 (79.110.194.140): index=2 time=7.153 usec arping has a usleep(1) call in its read loop, which can cause delays like this if there are other processes running and the scheduler decides to run another process. Try removing the usleep(1) on line 916 of arping.c and see if that helps. The best solution would be to use the kernel-provided timestamps from the pcap header, rather than calling gettimeofday() in userland. If you run "tcpdump arp", you should be able to see the packet timestamps as the kernel sees them. -- Dan Nelson dnelson@allantgroup.com