From owner-freebsd-bugs@FreeBSD.ORG  Tue Nov  4 10:10:02 2008
Return-Path: <owner-freebsd-bugs@FreeBSD.ORG>
Delivered-To: freebsd-bugs@hub.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 84E761065677
	for <freebsd-bugs@hub.freebsd.org>;
	Tue,  4 Nov 2008 10:10:02 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 46CE68FC13
	for <freebsd-bugs@hub.freebsd.org>;
	Tue,  4 Nov 2008 10:10:02 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mA4AA1fT081599
	for <freebsd-bugs@freefall.freebsd.org>; Tue, 4 Nov 2008 10:10:01 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mA4AA1hO081598;
	Tue, 4 Nov 2008 10:10:01 GMT (envelope-from gnats)
Resent-Date: Tue, 4 Nov 2008 10:10:01 GMT
Resent-Message-Id: <200811041010.mA4AA1hO081598@freefall.freebsd.org>
Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer)
Resent-To: freebsd-bugs@FreeBSD.org
Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org,
	Dmitry Tejblum <tejblum@yandex-team.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 74851106567E
	for <FreeBSD-gnats-submit@freebsd.org>;
	Tue,  4 Nov 2008 10:06:55 +0000 (UTC)
	(envelope-from tejblum@noc.yandex.net)
Received: from noc.yandex.net (noc.yandex.net [213.180.193.80])
	by mx1.freebsd.org (Postfix) with ESMTP id EF6658FC1E
	for <FreeBSD-gnats-submit@freebsd.org>;
	Tue,  4 Nov 2008 10:06:54 +0000 (UTC)
	(envelope-from tejblum@noc.yandex.net)
Received: from noc.yandex.net (localhost [127.0.0.1])
	by noc.yandex.net (8.14.3/8.14.3) with ESMTP id mA4A6qop083588
	for <FreeBSD-gnats-submit@freebsd.org>;
	Tue, 4 Nov 2008 13:06:52 +0300 (MSK)
	(envelope-from tejblum@noc.yandex.net)
Received: (from tejblum@localhost)
	by noc.yandex.net (8.14.3/8.14.3/Submit) id mA4A6qaf083587;
	Tue, 4 Nov 2008 13:06:52 +0300 (MSK) (envelope-from tejblum)
Message-Id: <200811041006.mA4A6qaf083587@noc.yandex.net>
Date: Tue, 4 Nov 2008 13:06:52 +0300 (MSK)
From: Dmitry Tejblum <tejblum@yandex-team.ru>
To: FreeBSD-gnats-submit@FreeBSD.org
X-Send-Pr-Version: 3.113
Cc: 
Subject: kern/128577: [patch] Send queue stall in ixgbe driver when MSIX
	interrups are used
X-BeenThere: freebsd-bugs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Dmitry Tejblum <tejblum@yandex-team.ru>
List-Id: Bug reports <freebsd-bugs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-bugs>,
	<mailto:freebsd-bugs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-bugs>
List-Post: <mailto:freebsd-bugs@freebsd.org>
List-Help: <mailto:freebsd-bugs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-bugs>,
	<mailto:freebsd-bugs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 04 Nov 2008 10:10:02 -0000


>Number:         128577
>Category:       kern
>Synopsis:       [patch] Send queue stall in ixgbe driver when MSIX interrups are used
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 04 10:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Tejblum
>Release:        FreeBSD 7.1-PRERELEASE i386
>Organization:
>Environment:
FreeBSD 7.1-PRERELEASE 


>Description:

A call of ixgbe_start_locked() is missed in ixgbe_msix_tx -- the TX interrupt
handler when MSIX interrupts are used.

(It sometime cause sending stall: when if_snd queue is full, the upper layer 
does not call if_start entry point, so if TX interrupt does not send some
packets and does not free some space in the if_snd queue, nothing will ever be
sent. Other TX handlers call ixgbe_start_locked().)

>How-To-Repeat:

>Fix:


--- ixgbe.c	2008-08-12 01:02:22.000000000 +0400
+++ ixgbe.c	2008-11-04 12:40:46.000000000 +0300
@@ -1056,6 +1056,7 @@ ixgbe_msix_tx(void *arg)
 	while (loop++ < MAX_INTR)
 		if (ixgbe_txeof(txr) == 0)
 			break;
+	ixgbe_start_locked(txr, adapter->ifp);
 	IXGBE_TX_UNLOCK(txr);
 	/* Reenable this interrupt */
 	IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, txr->eims);
>Release-Note:
>Audit-Trail:
>Unformatted: