kern/174851: [bxe] [patch] UDP checksum offload is wrong in bxe driver

YongHyeon PYUN pyunyh at gmail.com
Wed Jan 2 02:07:10 UTC 2013


On Mon, Dec 31, 2012 at 03:04:47PM -0800, Barney Cordoba wrote:
> 
> 
> --- On Mon, 12/31/12, Adrian Chadd <adrian at freebsd.org> wrote:
> 
> > From: Adrian Chadd <adrian at freebsd.org>
> > Subject: Re: kern/174851: [bxe] [patch] UDP checksum offload is wrong in bxe driver
> > To: "Garrett Cooper" <yanegomi at gmail.com>
> > Cc: "Barney Cordoba" <barney_cordoba at yahoo.com>, "David Christensen" <davidch at freebsd.org>, linimon at freebsd.org, freebsd-net at freebsd.org
> > Date: Monday, December 31, 2012, 2:00 PM
> > On 31 December 2012 07:58, Garrett
> > Cooper <yanegomi at gmail.com>
> > wrote:
> > 
> > > I would ask David about whether or not there was a
> > performance
> > > difference because they might have some numbers for
> > if_bxe.
> > >
> > > Not sure about the concept in general, but it seems
> > like a reasonable
> > > application protocol specific request. But by and
> > large, I agree that
> > > UDP checksumming doesn't make logical sense because it
> > adds
> > > unnecessary overhead on a L3 protocol that's assumed to
> > be unreliable.
> > 
> > People are terminating millions of VoIP calls on FreeBSD
> > devices. All using UDP.
> > 
> > I can imagine large scale VoIP gateways wanting to try and
> > benefit from this.
> > 
> 
> The statement above "assumes" that there is a benefit. voIP packets 
> are short, so the benefit of offloading is reduced. There is some
> delay added by the hardware, and there are cpu cycles used in managing
> the offload code. So those operations not only muddy the code,
> but they may not be faster than simply doing the checksum on a much, much
> faster cpu.

I'm under the impression that recent Intel controllers tend to add
more burden for driver to setup checksum offloading context. In
addition, some controllers have DMA restrictions to make checksum
offloading works such that it may add additional overhead unless
its DMA engine supports multiple outstanding reads.

As you said, checksum offloading may not make it faster but saved
CPU cycles for checksum offloading could be used for other system
activities.  You can disable checksum offloading any time when you
find it's not good for specific load.


More information about the freebsd-net mailing list