]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/core/skbuff.c
[NET]: uninline skb_pull, de-bloats a lot
[linux-2.6-omap-h63xx.git] / net / core / skbuff.c
index 3402eca768f87d90514da8971632194fd4b3f47b..cf489b6329e853dae5f07abb41eb68ac288b6e95 100644 (file)
@@ -878,6 +878,22 @@ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
 }
 EXPORT_SYMBOL(skb_put);
 
+/**
+ *     skb_pull - remove data from the start of a buffer
+ *     @skb: buffer to use
+ *     @len: amount of data to remove
+ *
+ *     This function removes data from the start of a buffer, returning
+ *     the memory to the headroom. A pointer to the next data in the buffer
+ *     is returned. Once the data has been pulled future pushes will overwrite
+ *     the old data.
+ */
+unsigned char *skb_pull(struct sk_buff *skb, unsigned int len)
+{
+       return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len);
+}
+EXPORT_SYMBOL(skb_pull);
+
 /* Trims skb to length len. It can change skb pointers.
  */