On Mon, Aug 07, 2006 at 04:29:09PM +1000, Herbert Xu ([EMAIL PROTECTED]) wrote: > Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: > > > > Attached patch allows to avoid unnecessary alignment overhead > > in skb->data allocation. > > Main idea is to allocate struct skb_shared_info from cache when > > addition of sizeof(struct skb_shared_info) ens up in different order > > allocation than initial size order. > > This allows to solve problem with 4k allocations for 1500 MTU and 32k > > allocations for 9k jumbo frames for some chips. > > Patch was not tested, so if idea worth it I will complete it. > > I thought the Intel guys were saying that their NIC could write the > full 16KB which means it it's unsafe to use the last four bytes, no?
Well, theirs comments in code say, that maximum allowed frame size is 0x3f00, so there is a little place at the end to put there a pointer, so I allocate size + sizeof(void *). If they actually can eat all 16k, then we need a pointer somewhere in the skb for shared_info, since 16k + sizeof(void *) will be aligned to 32k. > 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 -- Evgeniy Polyakov - 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