Lines Matching refs:owner

24 static int mem_charge(struct bpf_local_storage_map *smap, void *owner, u32 size)  in mem_charge()  argument
31 return map->ops->map_local_storage_charge(smap, owner, size); in mem_charge()
34 static void mem_uncharge(struct bpf_local_storage_map *smap, void *owner, in mem_uncharge() argument
40 map->ops->map_local_storage_uncharge(smap, owner, size); in mem_uncharge()
44 owner_storage(struct bpf_local_storage_map *smap, void *owner) in owner_storage() argument
48 return map->ops->map_owner_storage_ptr(owner); in owner_storage()
62 bpf_selem_alloc(struct bpf_local_storage_map *smap, void *owner, in bpf_selem_alloc() argument
67 if (charge_mem && mem_charge(smap, owner, smap->elem_size)) in bpf_selem_alloc()
78 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_alloc()
93 void *owner; in bpf_selem_unlink_storage_nolock() local
96 owner = local_storage->owner; in bpf_selem_unlink_storage_nolock()
103 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_unlink_storage_nolock()
108 mem_uncharge(smap, owner, sizeof(struct bpf_local_storage)); in bpf_selem_unlink_storage_nolock()
109 local_storage->owner = NULL; in bpf_selem_unlink_storage_nolock()
112 RCU_INIT_POINTER(*owner_storage(smap, owner), NULL); in bpf_selem_unlink_storage_nolock()
255 int bpf_local_storage_alloc(void *owner, in bpf_local_storage_alloc() argument
263 err = mem_charge(smap, owner, sizeof(*storage)); in bpf_local_storage_alloc()
275 storage->owner = owner; in bpf_local_storage_alloc()
281 (struct bpf_local_storage **)owner_storage(smap, owner); in bpf_local_storage_alloc()
312 mem_uncharge(smap, owner, sizeof(*storage)); in bpf_local_storage_alloc()
322 bpf_local_storage_update(void *owner, struct bpf_local_storage_map *smap, in bpf_local_storage_update() argument
337 local_storage = rcu_dereference(*owner_storage(smap, owner)); in bpf_local_storage_update()
344 selem = bpf_selem_alloc(smap, owner, value, true); in bpf_local_storage_update()
348 err = bpf_local_storage_alloc(owner, smap, selem); in bpf_local_storage_update()
351 mem_uncharge(smap, owner, smap->elem_size); in bpf_local_storage_update()
409 selem = bpf_selem_alloc(smap, owner, value, !old_sdata); in bpf_local_storage_update()