Subject: Re: skb_shared_info()

From: Evgeniy Polyakov <[email-masked]>
Date: Wed, 9 Aug 2006 09:35:24 +0400

On Tue, Aug 08, 2006 at 05:58:39PM -0700, David Miller ([email-masked]) wrote:
> From: Herbert Xu <[email-masked]>
> Date: Wed, 9 Aug 2006 10:36:16 +1000
> 
> > I'm not sure whether the problem is where we store skb_shared_info,
> > or the fact that we can't put kmalloc'ed memory into
> > skb_shinfo->frags.
> 
> That's a good point.

It is second problem actually.
If we want to change memory usage in skbs, we have problems with
frag_list and place where shared info lives, since it's addon only for
1500 MTU does not change alignment.

> I guess we could do something like:
> 
> struct skb_frag_struct {
> 	union {
> 		struct page *page;
> 		void *data;
> 	} u;
> 	__u16 page_offset;
> 	__u16 size;
> };
> 
> and something clever like a special page_offset encoding
> means "use data, not page".

We can separate kmalloced data from page by using internal page structures
(lru pointers and PG_slab bit).

-- 
	Evgeniy Polyakov