Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\skbuff.h Create Date:2022-07-28 05:52:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:skb_share_check - check if buffer is shared and if so clone it*@skb: buffer to check*@pri: priority for memory allocation* If the buffer is shared the buffer is cloned and the old copy* drops a reference. A new clone with a single reference is returned.

Proto:static inline struct sk_buff *skb_share_check(struct sk_buff *skb, gfp_t pri)

Type:struct sk_buff

Parameter:

TypeParameterName
struct sk_buff *skb
gfp_tpri
1681  might_sleep_if(gfpflags_allow_blocking(pri))
1682  If skb_shared - is the buffer shared*@skb: buffer to check* Returns true if more than one person has a reference to this* buffer. Then
1683  nskb = duplicate an sk_buff
1685  If Value is more likely to compile time(nskb) Then consume_skb(skb)
1687  Else free an sk_buff
1689  skb = nskb
1691  Return skb