Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:xsk_map_delete_elem

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

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
void *key
239  m = 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, structxsk_map, map)
241  k = key
243  If k >= max_entries Then Return -EINVAL
246  spin_lock_bh( & Synchronize map updates )
247  map_entry = xsk_map[k]
248  old_xs = xchg(map_entry, NULL)
249  If old_xs Then xsk_map_sock_delete(old_xs, map_entry)
251  spin_unlock_bh( & Synchronize map updates )
253  Return 0