Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\cpumap.c Create Date:2022-07-28 13:23:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cpu_map_build_skb

Proto:static struct sk_buff *cpu_map_build_skb(struct bpf_cpu_map_entry *rcpu, struct xdp_frame *xdpf, struct sk_buff *skb)

Type:struct sk_buff

Parameter:

TypeParameterName
struct bpf_cpu_map_entry *rcpu
struct xdp_frame *xdpf
struct sk_buff *skb
172  hard_start_headroom = sizeof(structxdp_frame) + headroom
191  frame_size = SKB_DATA_ALIGN(len + hard_start_headroom) + SKB_DATA_ALIGN(sizeof(structskb_shared_info))
194  pkt_data_start = data - hard_start_headroom
195  skb = build_skb_around(skb, pkt_data_start, frame_size)
196  If Value for the false possibility is greater at compile time(!skb) Then Return NULL
199  skb_reserve - adjust headroom*@skb: buffer to alter*@len: bytes to move* Increase the headroom of an empty &sk_buff by reducing the tail* room. This is only allowed for an empty buffer.
200  __skb_put(skb, len)
201  If metasize Then skb_metadata_set(skb, metasize)
205  protocol = eth_type_trans(skb, used by cpumap )
214  xdp_release_frame(xdpf)
217  Clear kernel pointers in xdp_frame
219  Return skb
Caller
NameDescribe
cpu_map_kthread_run