From owner-freebsd-net@FreeBSD.ORG Mon Jan 28 18:58:25 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 11C0C379; Mon, 28 Jan 2013 18:58:25 +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 E5753263; Mon, 28 Jan 2013 18:58:24 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 18FFAB9A0; Mon, 28 Jan 2013 13:58:24 -0500 (EST) From: John Baldwin To: freebsd-net@freebsd.org Subject: Re: ixgbe & msi/x Date: Mon, 28 Jan 2013 11:14:09 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; 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: <201301281114.09933.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 28 Jan 2013 13:58:24 -0500 (EST) Cc: net@freebsd.org, Vijay Singh X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 28 Jan 2013 18:58:25 -0000 On Monday, January 28, 2013 1:39:53 am Vijay Singh wrote: > I am investigating an issue where the ixgbe (82599) device is hung and > I think I have traced it to the driver not getting interrupts. I have > MSI/X enabled, with 2 rx/tx queues. > > I am trying to understand this bit of code in the MSI/X setup: > > if (ixgbe_enable_msix) { > ixgbe_configure_ivars(adapter); > /* Set up auto-mask */ <<== THIS BIT > if (hw->mac.type == ixgbe_mac_82598EB) > IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE); > else { > IXGBE_WRITE_REG(hw, IXGBE_EIAM_EX(0), 0xFFFFFFFF); > IXGBE_WRITE_REG(hw, IXGBE_EIAM_EX(1), 0xFFFFFFFF); > } > } > > Does this mean that ixgbe_disable_queue() is not needed in the msi/x > interrupt handler - ixgbe_msix_que()? You are really going to need the datasheet for this adapter to tell. From my recent reading of the datasheet for igb(4) (which is likely similar), it appears that MSI interrupts on that device are configured to auto-clear bits in the interrupt cause registers (ICR and EICR) when an MSI interrupt is posted so that the interrupt handler doesn't have to do a read of these registers to clear their status bits (one of the points of MSI interrupts is that you can just access in-memory descriptor rings when the handler fires without needing to do a read of the PCI device to force any posted memory writes by the device to flush). If I had to wager a guess, I'd say that ixgbe was following the same model. -- John Baldwin