diff options
Diffstat (limited to 'kernel/bpf/lpm_trie.c')
-rw-r--r-- | kernel/bpf/lpm_trie.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c index 885e45479680..584e02227671 100644 --- a/kernel/bpf/lpm_trie.c +++ b/kernel/bpf/lpm_trie.c | |||
@@ -522,12 +522,7 @@ static struct bpf_map *trie_alloc(union bpf_attr *attr) | |||
522 | return ERR_PTR(-ENOMEM); | 522 | return ERR_PTR(-ENOMEM); |
523 | 523 | ||
524 | /* copy mandatory map attributes */ | 524 | /* copy mandatory map attributes */ |
525 | trie->map.map_type = attr->map_type; | 525 | bpf_map_init_from_attr(&trie->map, attr); |
526 | trie->map.key_size = attr->key_size; | ||
527 | trie->map.value_size = attr->value_size; | ||
528 | trie->map.max_entries = attr->max_entries; | ||
529 | trie->map.map_flags = attr->map_flags; | ||
530 | trie->map.numa_node = bpf_map_attr_numa_node(attr); | ||
531 | trie->data_size = attr->key_size - | 526 | trie->data_size = attr->key_size - |
532 | offsetof(struct bpf_lpm_trie_key, data); | 527 | offsetof(struct bpf_lpm_trie_key, data); |
533 | trie->max_prefixlen = trie->data_size * 8; | 528 | trie->max_prefixlen = trie->data_size * 8; |