Subject: Re: ip_gre headroom allocation

From: Timo Teräs <[email-masked]>
Date: Thu, 11 Jun 2009 14:29:46 +0300

Herbert Xu wrote:
> On Thu, Jun 11, 2009 at 01:17:14PM +0300, Timo Teräs wrote:
>>> Otherwise we'd need a similar hack in ipip.c too.
>> I was under the impression that as we need to do the route lookup anyway
>> we could take advantage of the information available from there fully.
>>
>> But yes, your explanation makes perfect sense.
> 
> I think you're both right :)
> 
> We should include the IPsec head room here, but also in the
> dev->needed_headroom calculation so that most packets don't
> get reallocated in the first place.

I guess this is easy for point-to-point tunnels. But how about the
multipoint gre tunnels? The needed_headroom can vary on destination
basis depending on if they are NATted or not, and on the cipher/hash
used.

Can we change the needed_headroom on-the-fly? Increase it when ever
we encounter a larger path? But this also means some packages would
get extra headroom allocated.

- Timo