From owner-freebsd-net@FreeBSD.ORG Wed Aug 23 18:26:54 2006 Return-Path: X-Original-To: net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A77216A4DA; Wed, 23 Aug 2006 18:26:54 +0000 (UTC) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (lath.rinet.ru [195.54.192.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 920AD43D46; Wed, 23 Aug 2006 18:26:53 +0000 (GMT) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (localhost [127.0.0.1]) by lath.rinet.ru (8.13.6/8.13.6) with ESMTP id k7NIQn8P023760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Aug 2006 22:26:49 +0400 (MSD) (envelope-from oleg@lath.rinet.ru) Received: (from oleg@localhost) by lath.rinet.ru (8.13.6/8.13.6/Submit) id k7NIQn6Q023759; Wed, 23 Aug 2006 22:26:49 +0400 (MSD) (envelope-from oleg) Date: Wed, 23 Aug 2006 22:26:48 +0400 From: Oleg Bulyzhin To: Gleb Smirnoff Message-ID: <20060823182648.GA22888@lath.rinet.ru> References: <20060823161649.GE76666@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060823161649.GE76666@cell.sick.ru> User-Agent: Mutt/1.5.11 Cc: brad@openbsd.org, David Christensen , net@FreeBSD.org Subject: Re: bge(4) one packet wedge 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: Wed, 23 Aug 2006 18:26:54 -0000 On Wed, Aug 23, 2006 at 08:16:49PM +0400, Gleb Smirnoff wrote: > Colleagues, > > I've faced a problem in bge(4) when a single packet is in the RX > ring, but it isn't noticed by the driver. A reception of a packet > triggers interrupt and both packets are processed - an old one > and the new one. > > To reproduce the problem you need to run netperf (from ports > collection): netserver on another host (10.0.0.1) and netperf on > the host, where tested bge(4) is installed - 10.0.0.2. No traffic > except netperf's should flow through this NIC, or the problem won't > be reproduced! > > So, I run netperf client and simultaneously tcpdump on the > another host. After few seconds there is a wedge. The last packet > seen on 10.0.0.1 is the packet sent by 10.0.0.1 to 10.0.0.2. However > it isn't seen on 10.0.0.2. > > Ok, let's look at the receive ring: > > (kgdb) p $sc->bge_rx_saved_considx > $14 = 51 > (kgdb) p $sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx > $15 = 51 > > Looks like there is nothing to process. > > However, if I run 'ping -c 1 10.0.0.2' I will get an interrupt and read > two packets: first the old packet, and then recently sent ping. > > -- > Totus tuus, Glebius. > GLEBIUS-RIPN GLEB-RIPE What happens if you trigger other interrupt (like unplug/plug cable)? Will you get that packet? -- Oleg.