Hi Zach:

On Wed, Apr 05, 2006 at 05:51:02PM +0000, Zach Brown wrote:
>
> +                     if ((rt->u.dst.dev->features&NETIF_F_SG) &&
> +                         (SKB_DATA_KMALLOC_BYTES(alloclen + datalen)
> +                                                             > PAGE_SIZE)) {
> +                             /*
> +                              * datalen is shrinking so there won't be a
> +                              * trailer, but alloclen already accounted for
> +                              * it.  use that space for payload but only if
> +                              * it wasn't the trailer_len itself that pushed
> +                              * the alloc beyond a single page.
> +                              */
> +                             if (datalen - SKB_MAX_ORDER(alloclen, 0) >
> +                                 rt->u.dst.trailer_len)
> +                                     alloclen -= rt->u.dst.trailer_len;

I think this should be done unconditionally.  First of all at this
time ESP doesn't know how to deal with this anyway so it's just going
to reallocate and linearise the whole thing.  However, when we do fix
it we can just get it to allocate the trailer in its own frag so we
don't need to worry about trailer_len at all.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to