summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2008-04-14 00:04:51 -0700
committerDavid S. Miller <davem@davemloft.net>2008-04-14 00:04:51 -0700
commitbf299275882624b1908521ee8074df85160e9679 (patch)
treef35ff7ad85ca54f3028bda5fe125c0e7bd291d59 /include
parentf525c06d12b72cddb085df7f6f348c3c5a39b3ce (diff)
downloadblackbird-op-linux-bf299275882624b1908521ee8074df85160e9679.tar.gz
blackbird-op-linux-bf299275882624b1908521ee8074df85160e9679.zip
[SKB]: __skb_queue_after(prev) = __skb_insert(prev, prev->next)
By reordering, __skb_queue_after() is expressed in terms of __skb_insert(). Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h34
1 files changed, 12 insertions, 22 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index c2116200580a..bb107ab675fc 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -663,11 +663,21 @@ static inline void skb_queue_head_init_class(struct sk_buff_head *list,
}
/*
- * Insert an sk_buff at the start of a list.
+ * Insert an sk_buff on a list.
*
* The "__skb_xxxx()" functions are the non-atomic ones that
* can only be called with interrupts disabled.
*/
+extern void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list);
+static inline void __skb_insert(struct sk_buff *newsk,
+ struct sk_buff *prev, struct sk_buff *next,
+ struct sk_buff_head *list)
+{
+ newsk->next = next;
+ newsk->prev = prev;
+ next->prev = prev->next = newsk;
+ list->qlen++;
+}
/**
* __skb_queue_after - queue a buffer at the list head
@@ -684,13 +694,7 @@ static inline void __skb_queue_after(struct sk_buff_head *list,
struct sk_buff *prev,
struct sk_buff *newsk)
{
- struct sk_buff *next;
- list->qlen++;
-
- next = prev->next;
- newsk->next = next;
- newsk->prev = prev;
- next->prev = prev->next = newsk;
+ __skb_insert(newsk, prev, prev->next, list);
}
/**
@@ -735,20 +739,6 @@ static inline void __skb_queue_tail(struct sk_buff_head *list,
}
/*
- * Insert a packet on a list.
- */
-extern void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list);
-static inline void __skb_insert(struct sk_buff *newsk,
- struct sk_buff *prev, struct sk_buff *next,
- struct sk_buff_head *list)
-{
- newsk->next = next;
- newsk->prev = prev;
- next->prev = prev->next = newsk;
- list->qlen++;
-}
-
-/*
* Place a packet after a given packet in a list.
*/
extern void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list);
OpenPOWER on IntegriCloud