From owner-freebsd-net@FreeBSD.ORG Mon Sep 17 19:04:10 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 C170A106564A; Mon, 17 Sep 2012 19:04:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8FEEC8FC0C; Mon, 17 Sep 2012 19:04:10 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id ED15FB911; Mon, 17 Sep 2012 15:04:09 -0400 (EDT) From: John Baldwin To: Adrian Chadd Date: Mon, 17 Sep 2012 15:03:12 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201209171316.45029.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201209171503.12517.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 17 Sep 2012 15:04:10 -0400 (EDT) Cc: freebsd-net@freebsd.org, Ryan Stone Subject: Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc? 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: Mon, 17 Sep 2012 19:04:10 -0000 On Monday, September 17, 2012 1:45:12 pm Adrian Chadd wrote: > On 17 September 2012 10:16, John Baldwin wrote: > > > I think for if_bridge the fix is that it no longer uses if_start. :) > > :) > > > For real hardware you will get some sort of TX completion interrupt that will > > restart the transmit queue. Virtual software-only interfaces such as vlan(4) > > and if_bridge(4) don't have that luxury though, and the best bet for them is > > to probably have them use if_transmit instead. vlan(4) and if_bridge(4) are > > already fixed for that (if_bridge was only fixed a week or so ago in HEAD). > > I'm still not convinced that going the if_start route (with > process-to-completion) is going to work well when forwarding gobs of > packets on anything bar ${BIG_IRON}, but that aside.. Eh? For virtual interfaces, if_transmit introduces less overhead than using if_start (no locking, queueing, dequeueing, etc.). I expect that to be a net win for smaller boards. > It may be nice to introduce a virtual TX completion callback? Ie, a > child driver could signal that it's successfully drained its TX queue, > notifying any parent drivers that they can send more? That could work, but I generally think if_transmit is a better route for these sorts of things. That turns these interfaces into simple filters rather than building up their own queue, etc. -- John Baldwin