Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bce6a149 authored by Shannon Nelson's avatar Shannon Nelson Committed by Daniel Borkmann
Browse files

bpf_load: add map name to load_maps error message



To help when debugging bpf/xdp load issues, have the load_map()
error message include the number and name of the map that
failed.

Signed-off-by: default avatarShannon Nelson <shannon.nelson@oracle.com>
Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
Acked-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 8302b9bd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -284,8 +284,8 @@ static int load_maps(struct bpf_map_data *maps, int nr_maps,
							numa_node);
		}
		if (map_fd[i] < 0) {
			printf("failed to create a map: %d %s\n",
			       errno, strerror(errno));
			printf("failed to create map %d (%s): %d %s\n",
			       i, maps[i].name, errno, strerror(errno));
			return 1;
		}
		maps[i].fd = map_fd[i];