函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__dev_map_alloc_node

函数原型:static struct bpf_dtab_netdev *__dev_map_alloc_node(struct net *net, struct bpf_dtab *dtab, u32 ifindex, unsigned int idx)

返回类型:struct bpf_dtab_netdev

参数:

类型参数名称
struct net *net
struct bpf_dtab *dtab
u32ifindex
unsigned intidx
589  gfp等于DOC: Useful GFP flag combinations* Useful GFP flag combinations* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Useful GFP flag combinations that are commonly used. It is recommended* that subsystems start with one of these combinations and then set/clear按位或DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.
594  dev等于kmalloc_node(dev的长度, gfp, numa_node)
595  如果非dev则返回:错误号
598  bulkq等于__alloc_percpu_gfp(bulkq的长度, *的长度, gfp)
600  如果非bulkq
601  kfree(dev)
602  返回:错误号
605  遍历可用CPU(cpu)
606  bq等于per_cpu_ptr(bulkq, cpu)
607  obj等于dev
610  must be first member, due to tracepoint 等于通过接口索引号找设备
611  如果非 must be first member, due to tracepoint
612  释放内存
613  kfree(dev)
614  返回:错误号
617  keep track of map index for tracepoint 等于idx
618  dtab等于dtab
620  返回:dev
调用者
名称描述
__dev_map_update_elem
__dev_map_hash_update_elem