Deep understanding of the key data structures of Linux kernel network technology-skbuff 1, skb-> users and skb-> dataref difference skb-> users: when the number of references increases, this value and skb-> dataref both add skb-> dataref: When skb is cloned, only skb-> dataref is added, the cloned skb's skb-> users = 12, pskb-> copy and skb-> copy pskb-> copy: only copies the skb data structure, do not copy the buffer content skb-> copy: copy the skb data structure will also copy the buffer content 3, skb operation functions: reverse, put, push, pull, actually only modified the pointer, put: Move skb-> tail, skb-> tail + n without adding or deleting data. The general function is to add data reverse: this function moves the skb-> data and skb-> tail pointers. The main function is to force alignment. It is often called immediately after the skb is allocated: move skb-> data Pointer, skb-> data-n. The general function is to add the protocol header pull: Move skb-> data Pointer, skb-> data + n, the general function is to delete protocol header 4, skb's linked list operation function skb_queue_head_init: Initialize the two-way linked list skb_queue_head, skb_queue_tail: add the buffer to the queue header and tail skb_dequeue, skb_dequeue_tail respectively: delete an element from the header or tail of the queue skb_queue_purge: Change the queue to an empty queue skb_queue_walk: cyclically run each element in the queue in turn