From owner-freebsd-net@FreeBSD.ORG Wed Sep 26 14:14:36 2012 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 3C17F10657C2 for ; Wed, 26 Sep 2012 14:14:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4218FC0A for ; Wed, 26 Sep 2012 14:14:36 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 678EDB911; Wed, 26 Sep 2012 10:14:35 -0400 (EDT) From: John Baldwin To: Jack Vogel Date: Wed, 26 Sep 2012 09:55:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201209260955.14417.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 26 Sep 2012 10:14:35 -0400 (EDT) Cc: freebsd-net@freebsd.org, Vijay Singh Subject: Re: ixgbe rx & tx locks 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, 26 Sep 2012 14:14:36 -0000 On Tuesday, September 25, 2012 4:40:58 pm Jack Vogel wrote: > Ah yes, at one time I was keeping the RX side lock when calling the stack, > but then as I recall that had problems, so the code now releases and > reaquires > as you can see. It results in some contention but I'm not sure that's > avoidable. > > I've seen some LRO related panics on the 1G driver that may be related to > this lock release, or that's one theory I have.. > > Thanks for the testing Vijay! You only have to drop the RX lock around if_input() if you use the same lock for both TX and RX (as if_transmit() / if_start() can be invoked while locks in the network stack are held). If WITNESS complains, the fix is to only use the MTX_NETWORK_LOCK "lock type name" for your transmit ring locks, not for RX. -- John Baldwin