Lines Matching refs:attr
546 static struct bpf_map *trie_alloc(union bpf_attr *attr) in trie_alloc() argument
554 if (attr->max_entries == 0 || in trie_alloc()
555 !(attr->map_flags & BPF_F_NO_PREALLOC) || in trie_alloc()
556 attr->map_flags & ~LPM_CREATE_FLAG_MASK || in trie_alloc()
557 !bpf_map_flags_access_ok(attr->map_flags) || in trie_alloc()
558 attr->key_size < LPM_KEY_SIZE_MIN || in trie_alloc()
559 attr->key_size > LPM_KEY_SIZE_MAX || in trie_alloc()
560 attr->value_size < LPM_VAL_SIZE_MIN || in trie_alloc()
561 attr->value_size > LPM_VAL_SIZE_MAX) in trie_alloc()
569 bpf_map_init_from_attr(&trie->map, attr); in trie_alloc()
570 trie->data_size = attr->key_size - in trie_alloc()