From owner-freebsd-net@FreeBSD.ORG Wed Jan 2 02:07:10 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F9E390D; Wed, 2 Jan 2013 02:07:10 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by mx1.freebsd.org (Postfix) with ESMTP id BFC818FC08; Wed, 2 Jan 2013 02:07:09 +0000 (UTC) Received: by mail-pb0-f43.google.com with SMTP id um15so7604407pbc.16 for ; Tue, 01 Jan 2013 18:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:date:to:cc:subject:message-id:reply-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=PuCDbh8Rhcc40EzjAk1OwmuZ8rrB5MUiC2+mIyK1rFc=; b=fQQrzYv+kdx1C9fgWxVOPzu1k5HABMzXrThoPDBDWWenIOc9QKTiGxB9Z/ETyWkcLN Tuu+MyYGWI0nYt/quIGMvl8QJTxqYsB9B0xzwHoN8ty4CjOVS+ohWDXr5q0qnsoSgn88 GS4r/sWaUDX7+BxugKvtx8hZoxHVdA0jZ7Tbzc2Rlohc+FBBP2zvqa+PG8gzbOfn6ar+ mKhTjeYozffG18eqplvP2ruvWfDepN5RjvsKXIttJf9gwZzPC3VG2fq4kwSCQ7aJFJGc 75L6OQJNd/Foyg2SWumumWZfnarf/NuZ3asxXzmRk4EipUPyygMU30qwHY7byokdycNO 5bLw== X-Received: by 10.66.88.129 with SMTP id bg1mr132951318pab.71.1357092423775; Tue, 01 Jan 2013 18:07:03 -0800 (PST) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id vk5sm27496379pbc.34.2013.01.01.18.07.00 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Jan 2013 18:07:02 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 02 Jan 2013 11:06:55 +0900 From: YongHyeon PYUN Date: Wed, 2 Jan 2013 11:06:55 +0900 To: Barney Cordoba Subject: Re: kern/174851: [bxe] [patch] UDP checksum offload is wrong in bxe driver Message-ID: <20130102020655.GB6382@michelle.cdnetworks.com> References: <1356995087.59212.YahooMailClassic@web121604.mail.ne1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1356995087.59212.YahooMailClassic@web121604.mail.ne1.yahoo.com> User-Agent: Mutt/1.4.2.3i Cc: Garrett Cooper , freebsd-net@freebsd.org, Adrian Chadd , David Christensen , linimon@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2013 02:07:10 -0000 On Mon, Dec 31, 2012 at 03:04:47PM -0800, Barney Cordoba wrote: > > > --- On Mon, 12/31/12, Adrian Chadd wrote: > > > From: Adrian Chadd > > Subject: Re: kern/174851: [bxe] [patch] UDP checksum offload is wrong in bxe driver > > To: "Garrett Cooper" > > Cc: "Barney Cordoba" , "David Christensen" , linimon@freebsd.org, freebsd-net@freebsd.org > > Date: Monday, December 31, 2012, 2:00 PM > > On 31 December 2012 07:58, Garrett > > Cooper > > 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.