函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\cpumap.c Create Date:2022-07-27 14:41:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:cpu_map_build_skb

函数原型:static struct sk_buff *cpu_map_build_skb(struct bpf_cpu_map_entry *rcpu, struct xdp_frame *xdpf, struct sk_buff *skb)

返回类型:struct sk_buff

参数:

类型参数名称
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等于datahard_start_headroom
195  skb等于build_skb_around(skb, pkt_data_start, frame_size)
196  如果此条件成立可能性小(为编译器优化)(!skb)则返回:NULL
199  调整余量
200  __skb_put(skb, len)
201  如果metasizeskb_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  返回:skb
调用者
名称描述
cpu_map_kthread_run