Lines Matching refs:attr
46 static int queue_stack_map_alloc_check(union bpf_attr *attr) in queue_stack_map_alloc_check() argument
52 if (attr->max_entries == 0 || attr->key_size != 0 || in queue_stack_map_alloc_check()
53 attr->value_size == 0 || in queue_stack_map_alloc_check()
54 attr->map_flags & ~QUEUE_STACK_CREATE_FLAG_MASK || in queue_stack_map_alloc_check()
55 !bpf_map_flags_access_ok(attr->map_flags)) in queue_stack_map_alloc_check()
58 if (attr->value_size > KMALLOC_MAX_SIZE) in queue_stack_map_alloc_check()
67 static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr) in queue_stack_map_alloc() argument
69 int ret, numa_node = bpf_map_attr_numa_node(attr); in queue_stack_map_alloc()
74 size = (u64) attr->max_entries + 1; in queue_stack_map_alloc()
75 cost = queue_size = sizeof(*qs) + size * attr->value_size; in queue_stack_map_alloc()
89 bpf_map_init_from_attr(&qs->map, attr); in queue_stack_map_alloc()