[Openswan dev] IPComp

James Morris jmorris at redhat.com
Tue Jul 6 11:34:55 CEST 2004


On Sat, 3 Jul 2004, Herbert Xu wrote:

> On Sat, Jul 03, 2004 at 01:02:56PM +0200, Paul Wouters wrote:
> > 
> > He seems to have generic memory problems though, so I don't think this is an 
> > openswan or kernel ipsec bug.
> 
> He's probably having a memory fragmentation problem, but allocating
> 64K physically contiguous memory is something that should never be
> done over and over again.  As the IPCOMP init function is called
> regularly, this needs to be fixed.

It's only called when an SA is initialized.  This should not happen all 
the time, and if you can't find 64k for such an ooperation you have big 
problems.

> 
> I haven't looked at the IPCOMP code in detail, but I'd guess that
> we're allocating 64K as the largest IP packet size is 64K.

Yes, we need to decompress into a local scratch buffer rather than the 
skb, in case the decompression fails.

> Would it be possible to adjust the size of the buffer according
> to the packet size and allocate it in ipcomp_input()/ipcomp_output()
> instead?

We should not perform this allocation for each packet.


- James
-- 
James Morris
<jmorris at redhat.com>




More information about the Dev mailing list