Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dev_map_hash_delete_elem

Proto:static int dev_map_hash_delete_elem(struct bpf_map *map, void *key)

Type:int

Parameter:

TypeParameterName
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  If old_dev Then
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  Return ret