From owner-freebsd-net@FreeBSD.ORG Wed Aug 23 16:16:56 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 B47AE16A4DE; Wed, 23 Aug 2006 16:16:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 146D243D46; Wed, 23 Aug 2006 16:16:55 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id k7NGGoW8077782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Aug 2006 20:16:50 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id k7NGGnG4077781; Wed, 23 Aug 2006 20:16:49 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 23 Aug 2006 20:16:49 +0400 From: Gleb Smirnoff To: David Christensen Message-ID: <20060823161649.GE76666@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.6i Cc: brad@openbsd.org, oleg@FreeBSD.org, net@FreeBSD.org Subject: 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 16:16:56 -0000 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