* [PATCH bpf-next] bpf_load: add map name to load_maps error message
@ 2018-10-29 21:14 Shannon Nelson
2018-10-29 22:11 ` John Fastabend
0 siblings, 1 reply; 4+ messages in thread
From: Shannon Nelson @ 2018-10-29 21:14 UTC (permalink / raw)
To: ast, daniel; +Cc: netdev, shannon.lee.nelson
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>
---
samples/bpf/bpf_load.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c
index 89161c9..5de0357 100644
--- a/samples/bpf/bpf_load.c
+++ b/samples/bpf/bpf_load.c
@@ -282,8 +282,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];
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next] bpf_load: add map name to load_maps error message
2018-10-29 21:14 [PATCH bpf-next] bpf_load: add map name to load_maps error message Shannon Nelson
@ 2018-10-29 22:11 ` John Fastabend
2018-11-07 0:26 ` Song Liu
0 siblings, 1 reply; 4+ messages in thread
From: John Fastabend @ 2018-10-29 22:11 UTC (permalink / raw)
To: Shannon Nelson, ast, daniel; +Cc: netdev, shannon.lee.nelson
On 10/29/2018 02:14 PM, Shannon Nelson wrote:
> 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>
> ---
> samples/bpf/bpf_load.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c
> index 89161c9..5de0357 100644
> --- a/samples/bpf/bpf_load.c
> +++ b/samples/bpf/bpf_load.c
> @@ -282,8 +282,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];
>
LGTM
Acked-by: John Fastabend <john.fastabend@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next] bpf_load: add map name to load_maps error message
2018-10-29 22:11 ` John Fastabend
@ 2018-11-07 0:26 ` Song Liu
2018-11-07 21:41 ` Daniel Borkmann
0 siblings, 1 reply; 4+ messages in thread
From: Song Liu @ 2018-11-07 0:26 UTC (permalink / raw)
To: John Fastabend
Cc: shannon.nelson, Alexei Starovoitov, Daniel Borkmann, Networking,
shannon.lee.nelson
On Mon, Oct 29, 2018 at 3:12 PM John Fastabend <john.fastabend@gmail.com> wrote:
>
> On 10/29/2018 02:14 PM, Shannon Nelson wrote:
> > 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>
> > ---
> > samples/bpf/bpf_load.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c
> > index 89161c9..5de0357 100644
> > --- a/samples/bpf/bpf_load.c
> > +++ b/samples/bpf/bpf_load.c
> > @@ -282,8 +282,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];
> >
>
> LGTM
>
> Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Song Liu <songliubraving@fb.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next] bpf_load: add map name to load_maps error message
2018-11-07 0:26 ` Song Liu
@ 2018-11-07 21:41 ` Daniel Borkmann
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Borkmann @ 2018-11-07 21:41 UTC (permalink / raw)
To: Song Liu, John Fastabend
Cc: shannon.nelson, Alexei Starovoitov, Networking, shannon.lee.nelson
On 11/07/2018 01:26 AM, Song Liu wrote:
> On Mon, Oct 29, 2018 at 3:12 PM John Fastabend <john.fastabend@gmail.com> wrote:
>>
>> On 10/29/2018 02:14 PM, Shannon Nelson wrote:
>>> 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>
>>> ---
>>> samples/bpf/bpf_load.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c
>>> index 89161c9..5de0357 100644
>>> --- a/samples/bpf/bpf_load.c
>>> +++ b/samples/bpf/bpf_load.c
>>> @@ -282,8 +282,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];
>>>
>>
>> LGTM
>>
>> Acked-by: John Fastabend <john.fastabend@gmail.com>
>
> Acked-by: Song Liu <songliubraving@fb.com>
Applied to bpf-next, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-08 7:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 21:14 [PATCH bpf-next] bpf_load: add map name to load_maps error message Shannon Nelson
2018-10-29 22:11 ` John Fastabend
2018-11-07 0:26 ` Song Liu
2018-11-07 21:41 ` Daniel Borkmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).