User Tools

Site Tools


mywiki:linux:skb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mywiki:linux:skb [2021/10/07 11:49] – [other skb APIs] shaoguohmywiki:linux:skb [2022/04/02 17:29] (current) – external edit 127.0.0.1
Line 124: Line 124:
 ====== other skb APIs ====== ====== other skb APIs ======
   * skb_orphan():  使SKB不属于任何传输控制块。   * skb_orphan():  使SKB不属于任何传输控制块。
 +     * skb->destructor(skb);
 +     * skb->destructor = NULL;
 +     * skb->sk = NULL;
   * skb_cow(): 确保SKB存在指定的headroom空间。如果不足,会重新分配。   * skb_cow(): 确保SKB存在指定的headroom空间。如果不足,会重新分配。
 +     * skb_cow - copy header of skb when it is required, iek, if the skb passed lacks sufficient headroom or its data part is shared, data is reallocated. If reallocation fails, an error is returned and original skb is not changed.
   * skb_condense(): try to get rid of fragments/frag_list if possible. Can be used to save memory before skb is added to a busy queue. If packet has bytes in frags and enough tail room in skb->head, pull all of them, so that we can free the frags right now and adjust truesize.   * skb_condense(): try to get rid of fragments/frag_list if possible. Can be used to save memory before skb is added to a busy queue. If packet has bytes in frags and enough tail room in skb->head, pull all of them, so that we can free the frags right now and adjust truesize.
mywiki/linux/skb.1633578548.txt.gz · Last modified: (external edit)