函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:include\linux\skbuff.h Create Date:2022-07-27 06:52:15
首页 Copyright©Brick

3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom,
                int cloned)
{
    int delta = 0;
 
    if (headroom > skb_headroom(skb))
        delta = headroom - skb_headroom(skb);
 
    if (delta || cloned)
        return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD), 0,
                    GFP_ATOMIC);
    return 0;
}