From owner-freebsd-net@FreeBSD.ORG Thu Aug 16 13:14:09 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 E15671065673 for ; Thu, 16 Aug 2012 13:14:09 +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 B65B58FC19 for ; Thu, 16 Aug 2012 13:14:09 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1E15CB993; Thu, 16 Aug 2012 09:14:09 -0400 (EDT) From: John Baldwin To: freebsd-net@freebsd.org Date: Thu, 16 Aug 2012 08:35:53 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208160835.53303.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 16 Aug 2012 09:14:09 -0400 (EDT) Cc: Jack Vogel , 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: Thu, 16 Aug 2012 13:14:10 -0000 On Monday, August 13, 2012 6:17:53 pm Jack Vogel wrote: > After looking at the code again I think this is just what's happening, > mq_start > will schedule the task when it can't get the lock (due to the interrupt > already > holding it presumeably), so you get the tasklet code in contention with the > interrupt. > > Anyone with a clever notion of how to do things better? Are you queueing a task that does both RX and TX? That was a bug I fixed in igb that caused out-of-order packet processing for RX with igb. igb uses a smaller task for when it's start routine fails that only tries to restart transmission but doesn't do fullblown interrupt handling. Here's a possible patch (compiles, not run-tested) to implement this for ixgbe: http://www.FreeBSD.org/~jhb/patches/ixgbe_txq_task.patch -- John Baldwin