bpf: Set map_btf_{name, id} for all map types
[linux-2.6-microblaze.git] / kernel / bpf / cpumap.c
index 27595fc..bd86580 100644 (file)
@@ -543,6 +543,7 @@ static int cpu_map_get_next_key(struct bpf_map *map, void *key, void *next_key)
        return 0;
 }
 
+static int cpu_map_btf_id;
 const struct bpf_map_ops cpu_map_ops = {
        .map_alloc              = cpu_map_alloc,
        .map_free               = cpu_map_free,
@@ -551,6 +552,8 @@ const struct bpf_map_ops cpu_map_ops = {
        .map_lookup_elem        = cpu_map_lookup_elem,
        .map_get_next_key       = cpu_map_get_next_key,
        .map_check_btf          = map_check_no_btf,
+       .map_btf_name           = "bpf_cpu_map",
+       .map_btf_id             = &cpu_map_btf_id,
 };
 
 static int bq_flush_to_queue(struct xdp_bulk_queue *bq)