函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:After xchg pointer to bpf_cpu_map_entry, use the call_rcu() to* ensure any driver rcu critical sections have completed, but this* does not guarantee a flush has happened yet. Because driver side* rcu_read_lock/unlock only protects the running XDP program

函数原型:static void __cpu_map_entry_replace(struct bpf_cpu_map *cmap, u32 key_cpu, struct bpf_cpu_map_entry *rcpu)

返回类型:void

参数:

类型参数名称
struct bpf_cpu_map *cmap
u32key_cpu
struct bpf_cpu_map_entry *rcpu
447  old_rcpu等于xchg( & Below members specific for map type [key_cpu], rcpu)
448  如果old_rcpu
449  all_rcu() - Queue an RCU callback for invocation after a grace period
450  INIT_WORK( & kthread_stop_wq, alled from workqueue, to workaround syscall using preempt_disable )
451  schedule_work - put work task in global workqueue*@work: job to be done* Returns %false if @work was already on the kernel-global workqueue and* %true otherwise
调用者
名称描述
cpu_map_delete_elem
cpu_map_update_elem
cpu_map_free