From owner-freebsd-net@FreeBSD.ORG Fri Mar 16 15:32:59 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E5CF106566B; Fri, 16 Mar 2012 15:32:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6E4F48FC0A; Fri, 16 Mar 2012 15:32:59 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 245B846B2A; Fri, 16 Mar 2012 11:32:59 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 84883B94E; Fri, 16 Mar 2012 11:32:58 -0400 (EDT) From: John Baldwin To: Sean Bruno Date: Fri, 16 Mar 2012 11:29:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203151417.04507.jhb@freebsd.org> <1331854869.3317.15.camel@powernoodle-l7.corp.yahoo.com> In-Reply-To: <1331854869.3317.15.camel@powernoodle-l7.corp.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203161129.53034.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 16 Mar 2012 11:32:58 -0400 (EDT) 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: Fri, 16 Mar 2012 15:32:59 -0000 On Thursday, March 15, 2012 7:41:09 pm Sean Bruno wrote: > > > > > 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. Yes, it was buggy before in that it would just sit and poll unnecessarily. The problem was that it wasn't actually kicking off retransmits in some cases (e.g. igb_msix_que and em_msix_tx). That was the real cause of it hanging on OACTIVE. The current code schedules more tasks as a much more expensive workaround and I remove all that. > 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; > > > > -- John Baldwin