aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorJames Chapman <jchapman@katalix.com>2007-04-30 03:07:31 -0400
committerDavid S. Miller <davem@davemloft.net>2007-04-30 03:07:31 -0400
commit46f8914e53c28d0716c586e08a7c819d8ebb9d54 (patch)
tree722beec8d5a83d6c13b455e69ab567197e065c55 /include/linux/skbuff.h
parent04b090d50c88ac8e5ec9c2e985bb65bd153893aa (diff)
[SKB]: Introduce skb_queue_walk_safe()
This patch provides a method for walking skb lists while inserting or removing skbs from the list. Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2694cb3ca763..253a2b9be9d6 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1471,6 +1471,11 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
1471 prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ 1471 prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \
1472 skb = skb->next) 1472 skb = skb->next)
1473 1473
1474#define skb_queue_walk_safe(queue, skb, tmp) \
1475 for (skb = (queue)->next, tmp = skb->next; \
1476 skb != (struct sk_buff *)(queue); \
1477 skb = tmp, tmp = skb->next)
1478
1474#define skb_queue_reverse_walk(queue, skb) \ 1479#define skb_queue_reverse_walk(queue, skb) \
1475 for (skb = (queue)->prev; \ 1480 for (skb = (queue)->prev; \
1476 prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ 1481 prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \