From owner-freebsd-stable@FreeBSD.ORG Sun Feb 26 12:28:53 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.org Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CA0116A420; Sun, 26 Feb 2006 12:28:53 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5118E43D45; Sun, 26 Feb 2006 12:28:52 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id k1QCSos7088613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Feb 2006 15:28:50 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id k1QCSoAe088612; Sun, 26 Feb 2006 15:28:50 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 26 Feb 2006 15:28:50 +0300 From: Gleb Smirnoff To: Darren Reed Message-ID: <20060226122850.GM55275@cell.sick.ru> References: <43DB8EA6.7070503@metro.cx> <20060128211710.GA29790@lath.rinet.ru> <43DBED3F.3000408@metro.cx> <20060128230015.GC29790@lath.rinet.ru> <43DCCAA8.4050600@metro.cx> <20060131090912.GA88914@lath.rinet.ru> <20060226121605.GB16016@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20060226121605.GB16016@hub.freebsd.org> User-Agent: Mutt/1.5.6i Cc: Koen Martens , freebsd-stable@FreeBSD.org, Oleg Bulyzhin , darrenr@FreeBSD.org Subject: Re: ipfilter + bge strangeness X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2006 12:28:53 -0000 Darren, On Sun, Feb 26, 2006 at 12:16:05PM +0000, Darren Reed wrote: D> > Root of the problem is inside ipfilter - if driver use 'partial' (i.e. without D> > pseudo header) rx checksum offloading ipfilter fails to calculate checksum D> > correctly (it's using ip packet length (ip_fil_freebsd.c:1561) instead of D> > tcp/udp length). D> > This patch enables 'full' rxcsum offloading so ipfilter's bug should not be D> > triggered. D> D> I think what you're saying is that this is wrong: D> sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, D> htonl(m->m_pkthdr.csum_data + D> fin->fin_ip->ip_len + fin->fin_p)); D> D> And that "fin->fin_ip->ip_len" needs to be replaced by something D> that is like "ip_len - ip_hl - tcp/icmp/udp_hl" ? D> D> Just so that I understand the interactions here properly, is there D> a way to tell when FreeBSD will use partial checksums like it was D> before compare to now ? If the m->m_pkthdr.csum_flags field doesn't have the CSUM_PSEUDO_HDR flag, then the m->m_pkthdr.csum_data field contains partial checksum. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE