From owner-freebsd-net@FreeBSD.ORG Mon Sep 27 18:27:25 2004 Return-Path: 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 070A016A4CE; Mon, 27 Sep 2004 18:27:25 +0000 (GMT) Received: from smtp2.enst.fr (enst.enst.fr [137.194.2.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBF6343D31; Mon, 27 Sep 2004 18:27:24 +0000 (GMT) (envelope-from beyssac@bofh.enst.fr) Received: from bofh.enst.fr (bofh.enst.fr [137.194.32.191]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "bofh.enst.fr", Issuer "ENST CA" (not verified)) by smtp2.enst.fr (Postfix) with ESMTP id 4E39253B26; Mon, 27 Sep 2004 20:27:23 +0200 (CEST) Received: from bofh.enst.fr (localhost [127.0.0.1]) by bofh.enst.fr (8.13.1/8.13.1) with ESMTP id i8RIRMSw002466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 27 Sep 2004 20:27:22 +0200 (CEST) (envelope-from beyssac@bofh.enst.fr) Received: (from beyssac@localhost) by bofh.enst.fr (8.13.1/8.13.1/Submit) id i8RIRM1J002465; Mon, 27 Sep 2004 20:27:22 +0200 (CEST) (envelope-from beyssac) Date: Mon, 27 Sep 2004 20:27:22 +0200 From: Pierre Beyssac To: freebsd-net@freebsd.org Message-ID: <20040927182722.GA1664@bofh.enst.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i cc: tackerman@freebsd.org cc: mlaier@freebsd.org Subject: reproductible hang with if_em X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2004 18:27:25 -0000 Hello, I'm having a problem (under 5.3-BETA, but I don't think it matters much) with the if_em driver on bursty outbound traffic: the card is stuck in a state where it only returns ENOBUFS. No buffers ever become available again, but ifconfig down+up fixes the problem. >From a quick analysis it looks like the TX descriptor cleanup routine em_clean_transmit_interrupts() as called by em_encap() in such cases doesn't manage to find anything free with E1000_TXD_STAT_DD set. The card seems stuck in this state. A simple albeit dirty fix would be to cancel some or all untransmitted packets in such cases. Perhaps this is related to my using the card on a 100Mbps switch. I have a small program to exercise the hang in case someone would like to have a look at it. See below for the result of "sysctl hw.em0.debug_info=1" (notice the not avail1 = 12 and not avail2 = 0 hinting at em_clean_transmit_interrupts). em0: [MPSAFE] em0: bpf attached em0: Ethernet address: 00:0d:56:d0:5c:15 em0: Speed:N/A Duplex:N/A em0: Link is up 100 Mbps Full Duplex em0: Adapter hardware address = 0xc3570b34 em0:tx_int_delay = 66, tx_abs_int_delay = 66 em0:rx_int_delay = 0, rx_abs_int_delay = 66 em0: fifo workaround = 0, fifo_reset = 0 em0: hw tdh = 238, hw tdt = 238 em0: Num Tx descriptors avail = 256 em0: Tx Descriptors not avail1 = 12 em0: Tx Descriptors not avail2 = 0 em0: Std mbuf failed = 0 em0: Std mbuf cluster failed = 0 em0: Driver dropped packets = 0 -- Pierre Beyssac pb@enst.fr