From: Christoph Hellwig <hch@lst.de>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 3/3] deprecate dev_alloc_skb
Date: Wed, 26 Jul 2006 13:31:57 +0200 [thread overview]
Message-ID: <20060726113157.GC403@lst.de> (raw)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/include/linux/skbuff.h
===================================================================
--- linux-2.6.orig/include/linux/skbuff.h 2006-07-26 12:06:12.000000000 +0200
+++ linux-2.6/include/linux/skbuff.h 2006-07-26 12:08:49.000000000 +0200
@@ -1077,9 +1077,13 @@
* built in space. The built in space is used for optimisations.
*
* %NULL is returned in there is no free memory.
+ *
+ * NOTE: Do not use this function. Network driver want to use
+ * netdev_alloc_skb for the receive path, everyone else wants plain
+ * alloc_skb.
*/
-static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
- gfp_t gfp_mask)
+static inline struct sk_buff * __deprecated
+__dev_alloc_skb(unsigned int length, gfp_t gfp_mask)
{
struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD, gfp_mask);
if (likely(skb))
@@ -1098,8 +1102,13 @@
*
* %NULL is returned in there is no free memory. Although this function
* allocates memory it can be called from an interrupt.
+ *
+ * NOTE: Do not use this function. Network driver want to use
+ * netdev_alloc_skb for the receive path, everyone else wants plain
+ * alloc_skb.
*/
-static inline struct sk_buff *dev_alloc_skb(unsigned int length)
+static inline struct sk_buff * __deprecated
+dev_alloc_skb(unsigned int length)
{
return __dev_alloc_skb(length, GFP_ATOMIC);
}
reply other threads:[~2006-07-26 11:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060726113157.GC403@lst.de \
--to=hch@lst.de \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).