Date: Sat, 13 Feb 2010 17:18:46 +0100 From: Max Laier <max@love2party.net> To: Max Laier <mlaier@freebsd.org> 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 Message-ID: <201002131718.46177.max@love2party.net> In-Reply-To: <201002131604.o1DG4wA8058290@svn.freebsd.org> References: <201002131604.o1DG4wA8058290@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002131718.46177.max>