From owner-freebsd-net@FreeBSD.ORG Tue Jul 1 08:40:51 2008 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 232C61065670 for ; Tue, 1 Jul 2008 08:40:51 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 937498FC14 for ; Tue, 1 Jul 2008 08:40:50 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id AA1461B10EDC; Tue, 1 Jul 2008 10:40:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on malcho.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.6 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.4 Received: from hater.haters.org (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id 404061B10EF2; Tue, 1 Jul 2008 10:40:44 +0200 (CEST) Message-ID: <4869ED8B.80508@moneybookers.com> Date: Tue, 01 Jul 2008 11:40:43 +0300 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.14 (X11/20080616) MIME-Version: 1.0 To: Andrew Thompson References: <4868A34C.6030304@moneybookers.com> <20080630101629.GD79537@cdnetworks.co.kr> <20080701012531.GA92392@citylink.fud.org.nz> In-Reply-To: <20080701012531.GA92392@citylink.fud.org.nz> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.93, clamav-milter version 0.93 on blah.cmotd.com X-Virus-Status: Clean Cc: Pyun YongHyeon , freebsd-net@freebsd.org Subject: Re: if_bridge turns off checksum offload of members? 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: Tue, 01 Jul 2008 08:40:51 -0000 Andrew Thompson wrote: > On Mon, Jun 30, 2008 at 07:16:29PM +0900, Pyun YongHyeon wrote: > >> On Mon, Jun 30, 2008 at 12:11:40PM +0300, Stefan Lambrev wrote: >> > Greetings, >> > >> > I just noticed, that when I add em network card to bridge the checksum >> > offload is turned off. >> > I even put in my rc.conf: >> > ifconfig_em0="rxcsum up" >> > ifconfig_em1="rxcsum up" >> > but after reboot both em0 and em1 have this feature disabled. >> > >> > Is this expected behavior? Should I care about csum in bridge mode? >> > I noticed that enabling checksum offload manually improve things little btw. >> > >> >> AFAIK this is intended one, bridge(4) turns off Tx side checksum >> offload by default. I think disabling Tx checksum offload is >> required as not all members of a bridge may be able to do checksum >> offload. The same is true for TSO but it seems that bridge(4) >> doesn't disable it. >> If all members of bridge have the same hardware capability I think >> bridge(4) may not need to disable Tx side hardware assistance. I >> guess bridge(4) can scan every interface capabilities in a member >> and can decide what hardware assistance can be activated instead of >> blindly turning off Tx side hardware assistance. >> > > This patch should do that, are you able to test it Stefan? > ===> if_bridge (all) cc -O2 -fno-strict-aliasing -pipe -march=nocona -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/CORE/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/CORE -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/if_bridge/../../net/if_bridge.c /usr/src/sys/modules/if_bridge/../../net/if_bridge.c: In function 'bridge_capabilities': /usr/src/sys/modules/if_bridge/../../net/if_bridge.c:787: error: 'IFCAP_TOE' undeclared (first use in this function) /usr/src/sys/modules/if_bridge/../../net/if_bridge.c:787: error: (Each undeclared identifier is reported only once /usr/src/sys/modules/if_bridge/../../net/if_bridge.c:787: error: for each function it appears in.) *** Error code 1 1 error *** Error code 2 1 error *** Error code 2 1 error *** Error code 2 1 error *** Error code 2 1 error I'm building without "-j5" to see if the error message will change :) I'm using 7-STABLE from Jun 27 > > cheers, > Andrew > > ------------------------------------------------------------------------ > > _______________________________________________ > 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" -- Best Wishes, Stefan Lambrev ICQ# 24134177