From owner-freebsd-net@FreeBSD.ORG Thu Mar 15 23:41:27 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 654AA1065674; Thu, 15 Mar 2012 23:41:27 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 29AA38FC1E; Thu, 15 Mar 2012 23:41:26 +0000 (UTC) Received: from [127.0.0.1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q2FNf9Gq039637; Thu, 15 Mar 2012 16:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1331854870; bh=1Lz/P9BuoX+V9LYG17HrXgmXX2lKeamxMjirl6TqFpc=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=QWZ03hwLelz23Z0ERUDJ0vx4Rhavj4zPcUsv6a8xqKujIEEPHgVx23IIY48NQy3VD sW2e2RQaFDd3xRWBtgjGOBIiRapCoz83zgjlz2gznqGQRub6Wuq/LXZ50Q6c0Fb2HF zwX3dO56KEJFBXGpOAMd6tsjXhNk1CQ4olmaoKO8= From: Sean Bruno To: John Baldwin In-Reply-To: <201203151417.04507.jhb@freebsd.org> References: <4F5C587B.6010004@gmail.com> <201203151417.04507.jhb@freebsd.org> Content-Type: text/plain; charset="UTF-8" Date: Thu, 15 Mar 2012 16:41:09 -0700 Message-ID: <1331854869.3317.15.camel@powernoodle-l7.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "freebsd-net@freebsd.org" , Adrian Chadd , Hooman Fazaeli , Jason Wolfe Subject: Re: Intel 82574L interface wedging - em7.3.2/8.2-STABLE 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, 15 Mar 2012 23:41:27 -0000 > > Hmm, so I have yet to test this, but I found several bugs related to transmit > in em(4) and igb(4) recently just reading the code. (Mostly unnecessary > scheduling of tasks for transmit.) I've included your change of restarting > TX when link becomes active. I've also updated it to fix resume for em > and igb to DTRT when buf_ring is used, and to not include old-style start > routines at all when using multiq. It is at > http://www.freebsd.org/~jhb/patches/e1000_txeof2.patch > I think that some of the code being removed originated from our universe over here at Yahoo. We were seeing the driver assert IFF_OACTIVE and never clearing out. Reviewing this patch at a glance I note that the check of IFF_OACTIVE was removed, if the kernel can get us out of that state without the IFF_OACTIVE checks, then I'm good with it. Sean ref: @@ -1497,10 +1509,11 @@ if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else - em_start_locked(ifp, txr); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + em_start_locked(ifp, txr); #endif EM_TX_UNLOCK(txr); - if (more || (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { + if (more) { taskqueue_enqueue(adapter->tq, &adapter->que_task); return;