[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140907215417.GB3900@localhost.localdomain>
Date: Sun, 7 Sep 2014 23:54:17 +0200
From: Richard Cochran <richardcochran@...il.com>
To: Alexander Duyck <alexander.h.duyck@...el.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, willemb@...gle.com
Subject: Re: [PATCH net-next v4 2/3] net-timestamp: Make the clone operation
stand-alone from phy timestamping
On Thu, Sep 04, 2014 at 01:31:35PM -0400, Alexander Duyck wrote:
> +struct sk_buff *skb_clone_sk(struct sk_buff *skb)
> +{
> + struct sock *sk = skb->sk;
> + struct sk_buff *clone;
> +
> + if (!sk || !atomic_inc_not_zero(&sk->sk_refcnt))
> + return NULL;
> +
> + clone = skb_clone(skb, GFP_ATOMIC);
> + if (!clone) {
> + sock_put(sk);
> + return NULL;
> + }
> +
> + clone->sk = sk;
> + clone->destructor = sock_efree;
> +
> + return clone;
> +}
> +EXPORT_SYMBOL(skb_clone_sk);
This function could use a little kerneldoc explaining its purpose and
when to use it.
Thanks,
Richard
--
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