From owner-svn-src-all@FreeBSD.ORG Sat Feb 13 16:18:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 150601065670 for ; Sat, 13 Feb 2010 16:18:49 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id 9E7078FC0C for ; Sat, 13 Feb 2010 16:18:48 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-064-176-235.pools.arcor-ip.net [88.64.176.235]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0M4muv-1NuhGU23iv-00zLP9; Sat, 13 Feb 2010 17:18:47 +0100 Received: (qmail 39413 invoked from network); 13 Feb 2010 16:18:47 -0000 Received: from f8x64.laiers.local (192.168.4.188) by ns1.laiers.local with SMTP; 13 Feb 2010 16:18:47 -0000 From: Max Laier Organization: FreeBSD To: Max Laier Date: Sat, 13 Feb 2010 17:18:46 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE-p2; KDE/4.3.5; amd64; ; ) References: <201002131604.o1DG4wA8058290@svn.freebsd.org> In-Reply-To: <201002131604.o1DG4wA8058290@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201002131718.46177.max@love2party.net> X-Provags-ID: V01U2FsdGVkX18oJX/HuoRvVOADAytt6y8FotLO7xJNbDdCvcX wawwOl8ABo5utkiagtRo7hligvravGLV3O9MFM3SMW7HklVOW2 98TLqz5opaKRzuMM2FqbA== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r203834 - in head/sys: dev/cxgb dev/e1000 dev/ixgbe dev/mxge net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2010 16:18:49 -0000 On Saturday 13 February 2010 17:04:58 Max Laier wrote: > Author: mlaier > Date: Sat Feb 13 16:04:58 2010 > New Revision: 203834 > URL: http://svn.freebsd.org/changeset/base/203834 > > Log: > Fix drbr and altq interaction: > - introduce drbr_needs_enqueue that returns whether the interface/br > needs an enqueue operation: returns true if altq is enabled or there are > already packets in the ring (as we need to maintain packet order) - update > all drbr consumers > - fix drbr_flush > - avoid using the driver queue (IFQ_DRV_*) in the altq case as the > multiqueue consumer does not provide enough protection, serialize altq > interaction with the main queue lock > - make drbr_dequeue_cond work with altq > > Discussed with: kmacy, yongari, jfv > MFC after: 4 weeks > > Modified: > head/sys/dev/cxgb/cxgb_sge.c > head/sys/dev/e1000/if_em.c > head/sys/dev/e1000/if_igb.c > head/sys/dev/ixgbe/ixgbe.c > head/sys/dev/mxge/if_mxge.c > head/sys/net/if_var.h Note that em, igb and ixgbe are still subtly broken after this. The problem is that they all call drbr_enqueue after failure to transmit a previously dequeued packet. This might mess up the packet order as the buf_rings are strictly FIFO. The fix is to make sure that there are enough resources to transmit before dequeuing the packet (drbr_dequeue_cond may be helpful here) and discarding the packet if the transmission fails for any other reason. Regards, Max