Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 2008 10:59:30 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Sam Leffler <sam@freebsd.org>
Cc:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, gnn@freebsd.org, Luigi Rizzo <rizzo@iet.unipi.it>, Andrew Thompson <thompsa@freebsd.org>, net@freebsd.org
Subject:   Re: Small patch to multicast code...
Message-ID:  <alpine.BSF.1.10.0808301056540.59527@fledge.watson.org>
In-Reply-To: <48B8CE01.6010604@freebsd.org>
References:  <m28wuohfm5.wl%gnn@neville-neil.com> <20080825190207.GA73478@zibbi.meraka.csir.co.za> <20080825194038.GA75840@zibbi.meraka.csir.co.za> <m2y72jx33z.wl%gnn@neville-neil.com> <20080826144130.S66593@maildrop.int.zabbadoz.net> <m2abezwojl.wl%gnn@neville-neil.com> <48B4A62D.3080300@freebsd.org> <20080829162853.GB46693@onelab2.iet.unipi.it> <48B8248A.3060103@freebsd.org> <20080829164145.GA47030@onelab2.iet.unipi.it> <20080829223546.GG98483@citylink.fud.org.nz> <48B8CE01.6010604@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, 29 Aug 2008, Sam Leffler wrote:

>> The bridge code does a deep copy of the packet for each interface it 
>> broadcasts on due the firewall code modifying the headers. It sounds like 
>> this should just be a copy+pullup instead.
>
> I'd not do that.  I think there are paths that assume the deep copy.  Right 
> now the network code is very poor honoring read-only-ness of mbuf chains. 
> To get this right we need to do a good audit.  I know I hit issues when 
> doing some tricks w/ marking rx buffers read-only to avoid cache flushes. 
> netbsd trys to be more pedantic but still has problems too.

This strikes me as an extremely tricky thing to get right as bugs manifest in 
very subtle ways.  The IP output path makes lots of assumptions about being 
able to continue to write to outgoing headers for the purposes of deferred 
checksum calculation, NAT, IPSEC, fragmentation, encapsulation, etc.  IP 
multicast loopback is just one of the rare edge cases where, if exercised, we 
currently deterministically discover this, but presumably there's more to come 
as parallelism continues to increase.

Robert N M Watson
Computer Laboratory
University of Cambridge



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