mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 08:43:31 +00:00
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: Shannon Nelson <shannon.nelson@oracle.com> Acked-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
8302b9bd31
commit
bce6a14996
1 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue