Lines Matching refs:map
29 struct bpf_map *map = &smap->map; in mem_charge() local
31 if (!map->ops->map_local_storage_charge) in mem_charge()
34 return map->ops->map_local_storage_charge(smap, owner, size); in mem_charge()
40 struct bpf_map *map = &smap->map; in mem_uncharge() local
42 if (map->ops->map_local_storage_uncharge) in mem_uncharge()
43 map->ops->map_local_storage_uncharge(smap, owner, size); in mem_uncharge()
49 struct bpf_map *map = &smap->map; in owner_storage() local
51 return map->ops->map_owner_storage_ptr(owner); in owner_storage()
93 memset(SDATA(selem)->data, 0, smap->map.value_size); in bpf_selem_alloc()
95 selem = bpf_map_kzalloc(&smap->map, smap->elem_size, in bpf_selem_alloc()
102 copy_map_value(&smap->map, SDATA(selem)->data, value); in bpf_selem_alloc()
104 bpf_obj_swap_uptrs(smap->map.record, SDATA(selem)->data, value); in bpf_selem_alloc()
217 bpf_obj_free_fields(smap->map.record, SDATA(selem)->data); in bpf_selem_free_rcu()
240 bpf_obj_free_fields(smap->map.record, SDATA(selem)->data); in bpf_selem_free()
252 bpf_obj_free_fields(smap->map.record, SDATA(selem)->data); in bpf_selem_free()
499 storage = bpf_map_kzalloc(&smap->map, sizeof(*storage), in bpf_local_storage_alloc()
571 !btf_record_has_field(smap->map.record, BPF_SPIN_LOCK))) in bpf_local_storage_update()
610 copy_map_value_locked(&smap->map, old_sdata->data, in bpf_local_storage_update()
642 copy_map_value_locked(&smap->map, old_sdata->data, value, in bpf_local_storage_update()
720 int bpf_local_storage_map_check_btf(const struct bpf_map *map, in bpf_local_storage_map_check_btf() argument
775 u64 bpf_local_storage_map_mem_usage(const struct bpf_map *map) in bpf_local_storage_map_mem_usage() argument
777 struct bpf_local_storage_map *smap = (struct bpf_local_storage_map *)map; in bpf_local_storage_map_mem_usage()
808 bpf_map_init_from_attr(&smap->map, attr); in bpf_local_storage_map_alloc()
815 smap->buckets = bpf_map_kvcalloc(&smap->map, nbuckets, in bpf_local_storage_map_alloc()
848 return &smap->map; in bpf_local_storage_map_alloc()
856 void bpf_local_storage_map_free(struct bpf_map *map, in bpf_local_storage_map_free() argument
865 smap = (struct bpf_local_storage_map *)map; in bpf_local_storage_map_free()