Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jul 1999 00:57:13 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Cc:        mike@smith.net.au (Mike Smith), phk@critter.freebsd.dk, jeremyp@gsmx07.alcatel.com.au, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, jkh@FreeBSD.ORG
Subject:   Re: cvs commit: src/release/sysinstall tcpip.c 
Message-ID:  <199907230757.AAA00518@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 23 Jul 1999 02:29:06 %2B0200." <199907230029.CAA28046@labinfo.iet.unipi.it> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > I forgot to mention that if we bite the bullet and tell ether_input to 
> > deal with the whole mbuf we can move all of the bridging code out of 
> > individual drivers as well.
> 
> the reason why i _didn't_ do this is performance.
> In most cases bridges throw away packets so they just need access to
> the ethernet header. For some cards (e.g. the NE2000) there is a
> significant advantage in pulling out from the card _only_ the header,
> and the rest only when the packet is one you really need.
> 
> The problem is, the ne2000 uses programmed I/O and even on the PCI bus
> i think the top transfer speed is rather low (could be some 5MB/s or
> so) meaning that you can only build a full-speed multiport bridge if
> you do this kind if optimizations _in the driver_ 
> 
> Currently the only driver which uses this optimization is the ne2000
> driver. PCI cards using dma master mode probably don't need  it at
> 10mbit/s, and i am not totally sure if it is worthwhile at 100mbit/s
> where the cost of reprogramming the DMA engine might nuke any advantage.
> 
> You can argue "get a better card" but i think many people are using
> picobsd-based bridges (really firewalls) with cheap hardware (plus,
> here at least ne2000 clones are the only coax cards that i can find). We
> wouldn't be doing FreeBSD a favour if we removed this optimization.

Actually, I would argue that in this case the driver should simply 
optimise for the bridging case (reject frames that won't be bridged), 
but the actual bridging work itself should still be performed in 
ether_input.

The bridge code should also not be conditionalised in the driver itself 
(most of it should just be moved out).

-- 
\\  The mind's the standard       \\  Mike Smith
\\  of the man.                   \\  msmith@freebsd.org
\\    -- Joseph Merrick           \\  msmith@cdrom.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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