Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Feb 2006 15:28:50 +0300
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Darren Reed <darrenr@hub.freebsd.org>
Cc:        Koen Martens <fbsd@metro.cx>, freebsd-stable@FreeBSD.org, Oleg Bulyzhin <oleg@FreeBSD.org>, darrenr@FreeBSD.org
Subject:   Re: ipfilter + bge strangeness
Message-ID:  <20060226122850.GM55275@cell.sick.ru>
In-Reply-To: <20060226121605.GB16016@hub.freebsd.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060226122850.GM55275>