Home
last modified time | relevance | path

Searched refs:map_attr (Results 1 – 5 of 5) sorted by relevance

/tools/lib/bpf/
Dbpf.c114 struct bpf_create_map_attr map_attr = {}; in bpf_create_map_node() local
116 map_attr.name = name; in bpf_create_map_node()
117 map_attr.map_type = map_type; in bpf_create_map_node()
118 map_attr.map_flags = map_flags; in bpf_create_map_node()
119 map_attr.key_size = key_size; in bpf_create_map_node()
120 map_attr.value_size = value_size; in bpf_create_map_node()
121 map_attr.max_entries = max_entries; in bpf_create_map_node()
123 map_attr.numa_node = node; in bpf_create_map_node()
124 map_attr.map_flags |= BPF_F_NUMA_NODE; in bpf_create_map_node()
127 return bpf_create_map_xattr(&map_attr); in bpf_create_map_node()
[all …]
Dgen_loader.c384 struct bpf_create_map_attr *map_attr, int map_idx) in bpf_gen__map_create() argument
392 attr.map_type = map_attr->map_type; in bpf_gen__map_create()
393 attr.key_size = map_attr->key_size; in bpf_gen__map_create()
394 attr.value_size = map_attr->value_size; in bpf_gen__map_create()
395 attr.map_flags = map_attr->map_flags; in bpf_gen__map_create()
396 memcpy(attr.map_name, map_attr->name, in bpf_gen__map_create()
397 min((unsigned)strlen(map_attr->name), BPF_OBJ_NAME_LEN - 1)); in bpf_gen__map_create()
398 attr.numa_node = map_attr->numa_node; in bpf_gen__map_create()
399 attr.map_ifindex = map_attr->map_ifindex; in bpf_gen__map_create()
400 attr.max_entries = map_attr->max_entries; in bpf_gen__map_create()
[all …]
Dbpf_gen_internal.h33 void bpf_gen__map_create(struct bpf_gen *gen, struct bpf_create_map_attr *map_attr, int map_idx);
Dxsk.c368 struct bpf_create_map_attr map_attr; in get_xsk_prog() local
380 memset(&map_attr, 0, sizeof(map_attr)); in get_xsk_prog()
381 map_attr.map_type = BPF_MAP_TYPE_XSKMAP; in get_xsk_prog()
382 map_attr.key_size = sizeof(int); in get_xsk_prog()
383 map_attr.value_size = sizeof(int); in get_xsk_prog()
384 map_attr.max_entries = 1; in get_xsk_prog()
386 map_fd = bpf_create_map_xattr(&map_attr); in get_xsk_prog()
Dlibbpf.c4109 struct bpf_create_map_attr map_attr; in probe_kern_global_data() local
4119 memset(&map_attr, 0, sizeof(map_attr)); in probe_kern_global_data()
4120 map_attr.map_type = BPF_MAP_TYPE_ARRAY; in probe_kern_global_data()
4121 map_attr.key_size = sizeof(int); in probe_kern_global_data()
4122 map_attr.value_size = 32; in probe_kern_global_data()
4123 map_attr.max_entries = 1; in probe_kern_global_data()
4125 map = bpf_create_map_xattr(&map_attr); in probe_kern_global_data()
4286 struct bpf_create_map_attr map_attr; in probe_prog_bind_map() local
4294 memset(&map_attr, 0, sizeof(map_attr)); in probe_prog_bind_map()
4295 map_attr.map_type = BPF_MAP_TYPE_ARRAY; in probe_prog_bind_map()
[all …]