aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r--net/tipc/msg.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index ab467261bd9d..9ace47f44a69 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -767,6 +767,23 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, u32 *dnode,
767 int *err); 767 int *err);
768struct sk_buff *tipc_msg_reassemble(struct sk_buff_head *list); 768struct sk_buff *tipc_msg_reassemble(struct sk_buff_head *list);
769 769
770/* tipc_skb_peek(): peek and reserve first buffer in list
771 * @list: list to be peeked in
772 * Returns pointer to first buffer in list, if any
773 */
774static inline struct sk_buff *tipc_skb_peek(struct sk_buff_head *list,
775 spinlock_t *lock)
776{
777 struct sk_buff *skb;
778
779 spin_lock_bh(lock);
780 skb = skb_peek(list);
781 if (skb)
782 skb_get(skb);
783 spin_unlock_bh(lock);
784 return skb;
785}
786
770/* tipc_skb_peek_port(): find a destination port, ignoring all destinations 787/* tipc_skb_peek_port(): find a destination port, ignoring all destinations
771 * up to and including 'filter'. 788 * up to and including 'filter'.
772 * Note: ignoring previously tried destinations minimizes the risk of 789 * Note: ignoring previously tried destinations minimizes the risk of