Skip to contentSkip to conversation

deprecate dev_alloc_skb

PATCH In review Christoph Hellwig 1 participant 1 message Jul 26, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 deprecate dev_alloc_skb

include/linux/skbuff.h +12 -3
Index: linux-2.6/include/linux/skbuff.h
===================================================================
@@ -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);
 }