[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1412162524.16704.53.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 01 Oct 2014 04:22:04 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Vijay Subramanian <subramanian.vijay@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 net-next] net: cleanup and document skb fclone layout
On Wed, 2014-10-01 at 00:38 -0700, Vijay Subramanian wrote:
> > case SKB_FCLONE_CLONE:
> > - fclone_ref = (atomic_t *) (skb + 1);
> > - other = skb - 1;
> > + fclones = container_of(skb, struct sk_buff_fclones, skb2);
> >
> > /* The clone portion is available for
> > * fast-cloning again.
> > */
> > skb->fclone = SKB_FCLONE_UNAVAILABLE;
> >
>
> It looks like SKB_FCLONE_UNAVAILABLE has overloaded use depending on
> whether we are referring to skb allocated from head_cache or from
> fclone_cache. In the former case, it means this skb cannot be cloned
> i.e.(clone is unavailable) but in latter case, it means clone is free
> to be used.
> This overleading is confusing as seen in the comment in snippet above.
>
> Should we add something like SKB_CLONE_FREE for the second case that
> indicates that clone is free for use.? I can send a patch if it makes
> sense..
FCLONE_UNAVAILABLE always had two meanings, one for a normal skb telling
there is no fclone companion, one for the companion telling he is free.
It would be indeed clear to have SKB_CLONE_FREE for the companion.
--
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