summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorDavid S. Miller2018-07-30 05:42:53 +0200
committerDavid S. Miller2018-09-10 19:06:54 +0200
commita8305bff685252e80b7c60f4f5e7dd2e63e38218 (patch)
tree3f8f073a642ad27c0921917e3b9e1622b9956478 /include/linux/skbuff.h
parentbrcmfmac: Use __skb_peek(). (diff)
downloadkernel-qcow2-linux-a8305bff685252e80b7c60f4f5e7dd2e63e38218.tar.gz
kernel-qcow2-linux-a8305bff685252e80b7c60f4f5e7dd2e63e38218.tar.xz
kernel-qcow2-linux-a8305bff685252e80b7c60f4f5e7dd2e63e38218.zip
net: Add and use skb_mark_not_on_list().
An SKB is not on a list if skb->next is NULL. Codify this convention into a helper function and use it where we are dequeueing an SKB and need to mark it as such. 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 89283b77294d..c4c9e3f5cd9a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1339,6 +1339,11 @@ static inline void skb_zcopy_abort(struct sk_buff *skb)
}
}
+static inline void skb_mark_not_on_list(struct sk_buff *skb)
+{
+ skb->next = NULL;
+}
+
/**
* skb_queue_empty - check if a queue is empty
* @list: queue head