Re: ipsec: ipcomp - Decompress into frags if necessary

From: David Miller
Date: Fri Jul 25 2008 - 05:58:25 EST


From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 25 Jul 2008 15:43:28 +0800

> On Fri, Jul 25, 2008 at 03:41:09PM +0800, Herbert Xu wrote:
> >
> > Here is the first part:
>
> And finally:
>
> ipsec: ipcomp - Decompress into frags if necessary
>
> When decompressing extremely large packets allocating them through
> kmalloc is prone to failure. Therefore it's better to use page
> frags instead.
>
> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Also applied, nice work Herbert.

About MAX_SKB_FRAGS, if we go over that limit we probably need to
log a message or something because we'll likely get that same kind
of huge sized packet that we can't handle in future retransmits.
There is no way to figure out that this is what is happening.

Actually I wonder if it's even possible. Our limit is 64K anyways
(and that's our scratch buffer size) and MAX_SKB_FRAGS is always
large enough to accomodate at least 64K of data.

So perhaps it wants a WARN_ON :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/