summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-23 00:49:44 -0700
committerDavid S. Miller <davem@davemloft.net>2008-09-23 00:49:44 -0700
commit1164f52a244204830c7625b3c22812781996d7b4 (patch)
treeafbc8f208e299bc0a68d8d50ba1dd9b5fe5b596d /include/linux/skbuff.h
parent249c8b42c7e5e6f33d0ff983041f08278b137e53 (diff)
downloadblackbird-op-linux-1164f52a244204830c7625b3c22812781996d7b4.tar.gz
blackbird-op-linux-1164f52a244204830c7625b3c22812781996d7b4.zip
net: Add skb_queue_walk_from() and skb_queue_walk_from_safe().
These will be used by TCP write queue handling and elsewhere. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index d2f1778877d7..a19ea43fea02 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1571,6 +1571,15 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
skb != (struct sk_buff *)(queue); \
skb = tmp, tmp = skb->next)
+#define skb_queue_walk_from(queue, skb) \
+ for (; prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \
+ skb = skb->next)
+
+#define skb_queue_walk_from_safe(queue, skb, tmp) \
+ for (tmp = skb->next; \
+ skb != (struct sk_buff *)(queue); \
+ skb = tmp, tmp = skb->next)
+
#define skb_queue_reverse_walk(queue, skb) \
for (skb = (queue)->prev; \
prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \
OpenPOWER on IntegriCloud