From owner-freebsd-net@FreeBSD.ORG Tue Jul 1 15:12:00 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 EF1271065675 for ; Tue, 1 Jul 2008 15:12:00 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 870068FC19 for ; Tue, 1 Jul 2008 15:12:00 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m61EZdoG060471 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Jul 2008 07:35:39 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <486A40BB.70006@freebsd.org> Date: Tue, 01 Jul 2008 07:35:39 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Andrew Thompson References: <4868A34C.6030304@moneybookers.com> <20080630101629.GD79537@cdnetworks.co.kr> <20080701012531.GA92392@citylink.fud.org.nz> <4869FE2E.4070805@moneybookers.com> <20080701140550.GA379@citylink.fud.org.nz> In-Reply-To: <20080701140550.GA379@citylink.fud.org.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: Pyun YongHyeon , freebsd-net@freebsd.org, Stefan Lambrev 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 15:12:01 -0000 Andrew Thompson wrote: > On Tue, Jul 01, 2008 at 12:51:42PM +0300, Stefan Lambrev wrote: > >> Hi, >> >> May be a stupid questions, but: >> >> 1) There are zero matches of IFCAP_TOE in kernel sources .. there is not >> support for TOE in 7.0, but may be this is work in progress for 8-current? >> > > Yes, its in current only. Just remove IFCAP_TOE. > > >> 2) In #define BRIDGE_IFCAPS_MASK (IFCAP_TOE|IFCAP_TSO|IFCAP_TXCSUM) - TOE >> should be repleaced with RXCSUM or just removed? >> 3) Why RX is never checked? In my case this doesn't matter because em turn >> off both TX and RX if only one is disabled, but probably there is a >> hardware, >> that can separate them e.g. RX disabled while TX enabled? >> > > Rx does not matter, whatever isnt offloaded in hardware is just computed > locally such as checking the cksum. Its Tx that messes up the bridge, if > a outgoing packet is generated locally on an interface that has Tx > offloading, it may actaully be sent out a different bridge member that > does not have that capability. This would cause it to be sent with an > invalid checksum for instance. > > The bridge used to just disable Tx offloading but this patch you are > testing makes sure each feature is supported by all members. > > >> 4) I'm not sure why bridge should not work with two interfaces one of which >> support TX and the other does not? At least if I turn on checksum offload >> only on one of the interfaces the bridge is still working ... >> >> Andrew Thompson wrote: >> >> - cut - >> >>> This patch should do that, are you able to test it Stefan? >>> >>> >>> cheers, >>> Andrew >>> >>> >> P.S. I saw very good results with netisr2 on a kernel from p4 before few >> months .. are there any patches flying around so I can test them with >> 7-STABLE? :) >> >> This issue has come up before. Handling checksum offload in the bridge for devices that are not capable is not a big deal and is important for performance. TSO likewise should be done but we're missing a generic TSO support routine to do that (I believe, netbsd has one and linux has a GSO mechanism). Sam