projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8302b9b
)
bpf_load: add map name to load_maps error message
author
Shannon Nelson
<
[email protected]
>
Mon, 29 Oct 2018 21:14:41 +0000
(14:14 -0700)
committer
Daniel Borkmann
<
[email protected]
>
Wed, 7 Nov 2018 21:34:54 +0000
(22:34 +0100)
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 <
[email protected]
>
Acked-by: John Fastabend <
[email protected]
>
Acked-by: Song Liu <
[email protected]
>
Signed-off-by: Daniel Borkmann <
[email protected]
>
samples/bpf/bpf_load.c
patch
|
blob
|
history
diff --git
a/samples/bpf/bpf_load.c
b/samples/bpf/bpf_load.c
index e6d7e0fe155b47bd461f5d713e7a4eb4ad4e1ace..5c052b9ea63fe2db7685c03344a157aad3c031df 100644
(file)
--- a/
samples/bpf/bpf_load.c
+++ b/
samples/bpf/bpf_load.c
@@
-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];