route/arp lifetime (Re: it's the output, not ack coalescing (Re: TSO and FreeBSD vs Linux))

Alexander V. Chernikov melifaro at ipfw.ru
Mon Aug 19 11:44:36 UTC 2013


On 14.08.2013 19:48, Luigi Rizzo wrote:
> On Wed, Aug 14, 2013 at 05:40:28PM +0200, Marko Zec wrote:
>> On Wednesday 14 August 2013 14:40:24 Luigi Rizzo wrote:
>>> On Wed, Aug 14, 2013 at 04:15:25PM +0400, Alexander V. Chernikov wrote:
> ...
>> FWIW, apparently we already have that infrastrucure in place - if_rele()
>> calls if_free_internal() only when the last reference to the ifnet is
>> dropped, so with little care this should be usable for caching ifp pointers
>> w/o fears for kernel crashes mentioned above.
> maybe Alexander was referring to holding references to the rte entries
> returned as a result of the lookup. The rte holds a reference to the ifp.
Yes. Since there is the only refcount which is protected (and is also a 
huge performance killer).

Btw, there is a picture describing IPv4 packet flow from my 
still-not-written post related network stack performance,
maybe it can be useful: http://static.ipfw.ru/images/freebsd_ipv4_flow.png
>
> cheers
> luigi
>



More information about the freebsd-net mailing list