[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 10 Oct 2011 16:13:56 +0100
From: Ian Campbell <Ian.Campbell@...rix.com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 9/9] net: add opaque struct around skb frag page
On Mon, 2011-10-10 at 16:09 +0100, Eric Dumazet wrote:
> Le lundi 10 octobre 2011 à 12:11 +0100, Ian Campbell a écrit :
> > I've split this bit out of the skb frag destructor patch since it helps enforce
> > the use of the fragment API.
> >
> > Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
> > ---
> > include/linux/skbuff.h | 10 ++++++----
> > net/core/skbuff.c | 6 +++---
> > 2 files changed, 9 insertions(+), 7 deletions(-)
> >
> > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> > index ac6b05a..f881d75 100644
> > --- a/include/linux/skbuff.h
> > +++ b/include/linux/skbuff.h
> > @@ -135,7 +135,9 @@ struct sk_buff;
> > typedef struct skb_frag_struct skb_frag_t;
> >
> > struct skb_frag_struct {
> > - struct page *page;
> > + struct {
> > + struct page *p;
> > + } page;
>
> Oh well, why dont you rename page to something else, say frag_page ?
I looked at renaming this field and the impact was far larger than this
(already huge) set of series.
Keeping the name for the outer struct also has the nice property that
when the struct becomes something like:
struct {
struct page *p;
struct skb_frag_destructor *destr;
} page;
existing code which does
fraga->page = fragb->page
will carry the destructor along magically without needing modification.
Ian.
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists