Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Sep 2012 13:00:04 -0700
From:      Jack Vogel <jfvogel@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-net@freebsd.org, Adrian Chadd <adrian@freebsd.org>, Ryan Stone <rysto32@gmail.com>
Subject:   Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?
Message-ID:  <CAFOYbcmt93px4poAmLgv6F288CDP_mPcejU8Mw5-h3h-A7bKUA@mail.gmail.com>
In-Reply-To: <201209171503.12517.jhb@freebsd.org>
References:  <CAFMmRNzkwbQpUZ3OOoMKVdrz=dePc5fkeX3m-5vXtiWJ7qXwVA@mail.gmail.com> <201209171316.45029.jhb@freebsd.org> <CAJ-Vmon1iHpjx37=RDOqFPthLv5nTTyjmkOR246nBQ4VxwhVOA@mail.gmail.com> <201209171503.12517.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
So, you mean having them create their own buf ring I assume? Would be easy
enough to hack some code and try it if someone is so inclined?

Jack



On Mon, Sep 17, 2012 at 12:03 PM, John Baldwin <jhb@freebsd.org> wrote:

> On Monday, September 17, 2012 1:45:12 pm Adrian Chadd wrote:
> > On 17 September 2012 10:16, John Baldwin <jhb@freebsd.org> 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
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFOYbcmt93px4poAmLgv6F288CDP_mPcejU8Mw5-h3h-A7bKUA>