From: Richard Cochran <richardcochran@gmail.com>
To: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, willemb@google.com
Subject: Re: [PATCH net-next v4 2/3] net-timestamp: Make the clone operation stand-alone from phy timestamping
Date: Sun, 7 Sep 2014 23:54:17 +0200 [thread overview]
Message-ID: <20140907215417.GB3900@localhost.localdomain> (raw)
In-Reply-To: <20140904173116.7702.30877.stgit@ahduyck-bv4.jf.intel.com>
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
next prev parent reply other threads:[~2014-09-07 21:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 17:30 [PATCH net-next v4 0/3] Series short description Alexander Duyck
2014-09-04 17:31 ` [PATCH net-next v4 1/3] net-timestamp: Merge shared code between phy and regular timestamping Alexander Duyck
2014-09-04 17:31 ` [PATCH net-next v4 2/3] net-timestamp: Make the clone operation stand-alone from phy timestamping Alexander Duyck
2014-09-04 17:48 ` Rick Jones
2014-09-04 18:30 ` Alexander Duyck
2014-09-04 18:33 ` Rick Jones
2014-09-07 21:50 ` Richard Cochran
2014-09-07 23:35 ` Alexander Duyck
2014-09-07 21:54 ` Richard Cochran [this message]
2014-09-04 17:32 ` [PATCH net-next v4 3/3] net: merge cases where sock_efree and sock_edemux are the same function Alexander Duyck
2014-09-06 0:44 ` [PATCH net-next v4 0/3] Series short description David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140907215417.GB3900@localhost.localdomain \
--to=richardcochran@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.