skb: introduce skb_queue_walk_safe()
Subsystems (2)
PATCH 1/5 skb: introduce skb_queue_walk_safe()
[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 <[email protected]>
include/linux/skbuff.h +5 -0
@@ -1299,6 +1299,11 @@ static inline int pskb_trim_rcsum(structprefetch (skb->next), (skb != (struct sk_buff *)(queue)); \ skb = skb->next) +#define skb_queue_walk_safe (queue, skb, tmp) \ + for (skb = (queue)->next, 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)); \
From: James Chapman <[email protected]>
Date: Mon, 23 Apr 2007 17:01:03 +0100
Quoted 6 lines
[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 <[email protected]>
Applied, thanks.