The skb_dequeue function removes the head element of an sk_buff_head.
It decrements the list qlen pointer, and cleanly detaches the head from
the queue. This function should be used instead of performing this task
manually, as it provides a clean, standardized way of manipulating an
sk_buff_head, and provides interrupt disabling (see NOTES below.)
RETURN VALUE
Returns a pointer to the head element of list, or NULL if
list is empty.
NOTES
It is important to note the difference between not only __skb_dequeue
and skb_dequeue, but all the __skb_ functions and their
skb_ counterparts. Essentially, the __skb_ functions are
non-atomic, and should only be used with interrupts disabled. As a convenience,
the skb_ functions are provided, which perform interrupt disable /
enable wrapper functionality in addition to performing their specific tasks.