skb_insert and skb_append are essentially wrapper functions for
__skb_insert (see NOTES, below.) __skb_insert inserts
newsk into list, and resets the appropriate next and prev
pointers. prev and next are used to frame newsk in
list. After setting the next and prev pointers in newsk,
__skb_insert sets the prev pointer in next and the next pointer
in prev, sets the list pointer in newsk, and increments the qlen
counter in list.
skb_insert and skb_append should be used to add sk_buffs
to a list rather than performing this task manually; in addition to
performing this task in a standardized way, these functions also provide
for interrupt diasabling and prevent list mangling. Both of these
functions use the list pointer in old to determine to which list
newsk should be attached.
The skb_insert function adds newsk to the list before old.
The skb_append function adds newsk to the list after old.
It is important to note the difference between not only skb_insert,
skb_append and __skb_insert, 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