函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dev_map_hash_delete_elem

函数原型:static int dev_map_hash_delete_elem(struct bpf_map *map, void *key)

返回类型:int

参数:

类型参数名称
struct bpf_map *map
void *key
564  dtab等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(map, structbpf_dtab, map)
566  k等于key
568  ret等于负ENOENT
570  spin_lock_irqsave( & index_lock, flags)
572  old_dev等于__dev_map_hash_lookup_elem(map, k)
573  如果old_dev
574  items自减
575  hlist_del_init_rcu - deletes entry from hash list with re-initialization*@n: the element to delete from the hash list.* Note: list_unhashed() on the node return true after this. It is* useful for RCU based read lockfree traversal if the writer side
576  all_rcu() - Queue an RCU callback for invocation after a grace period
577  ret等于0
579  spin_unlock_irqrestore( & index_lock, flags)
581  返回:ret