* [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
@ 2019-08-20 1:36 YueHaibing
2019-08-20 7:28 ` Björn Töpel
2019-08-20 15:09 ` Daniel Borkmann
0 siblings, 2 replies; 7+ messages in thread
From: YueHaibing @ 2019-08-20 1:36 UTC (permalink / raw)
To: bjorn.topel, magnus.karlsson, jonathan.lemon, ast, daniel, kafai,
songliubraving, yhs, john.fastabend
Cc: YueHaibing, netdev, bpf, kernel-janitors
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
kernel/bpf/xskmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/xskmap.c b/kernel/bpf/xskmap.c
index 4cc28e226398..942c662e2eed 100644
--- a/kernel/bpf/xskmap.c
+++ b/kernel/bpf/xskmap.c
@@ -21,7 +21,7 @@ int xsk_map_inc(struct xsk_map *map)
struct bpf_map *m = &map->map;
m = bpf_map_inc(m, false);
- return IS_ERR(m) ? PTR_ERR(m) : 0;
+ return PTR_ERR_OR_ZERO(m);
}
void xsk_map_put(struct xsk_map *map)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
2019-08-20 1:36 [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc() YueHaibing
@ 2019-08-20 7:28 ` Björn Töpel
2019-08-20 8:55 ` Dan Carpenter
2019-08-20 15:09 ` Daniel Borkmann
1 sibling, 1 reply; 7+ messages in thread
From: Björn Töpel @ 2019-08-20 7:28 UTC (permalink / raw)
To: YueHaibing, magnus.karlsson, jonathan.lemon, ast, daniel, kafai,
songliubraving, yhs, john.fastabend
Cc: netdev, bpf, kernel-janitors
On 2019-08-20 03:36, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> kernel/bpf/xskmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/bpf/xskmap.c b/kernel/bpf/xskmap.c
> index 4cc28e226398..942c662e2eed 100644
> --- a/kernel/bpf/xskmap.c
> +++ b/kernel/bpf/xskmap.c
> @@ -21,7 +21,7 @@ int xsk_map_inc(struct xsk_map *map)
> struct bpf_map *m = &map->map;
>
> m = bpf_map_inc(m, false);
> - return IS_ERR(m) ? PTR_ERR(m) : 0;
> + return PTR_ERR_OR_ZERO(m);
> }
>
> void xsk_map_put(struct xsk_map *map)
>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Thanks for the patch!
For future patches: Prefix AF_XDP socket work with "xsk:" and use "PATCH
bpf-next" to let the developers know what tree you're aiming for.
Cheers!
Björn
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
2019-08-20 7:28 ` Björn Töpel
@ 2019-08-20 8:55 ` Dan Carpenter
2019-08-20 9:25 ` Björn Töpel
0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2019-08-20 8:55 UTC (permalink / raw)
To: Björn Töpel
Cc: YueHaibing, magnus.karlsson, jonathan.lemon, ast, daniel, kafai,
songliubraving, yhs, john.fastabend, netdev, bpf,
kernel-janitors
On Tue, Aug 20, 2019 at 09:28:26AM +0200, Björn Töpel wrote:
> For future patches: Prefix AF_XDP socket work with "xsk:" and use "PATCH
> bpf-next" to let the developers know what tree you're aiming for.
There are over 300 trees in linux-next. It impossible to try remember
everyone's trees. No one else has this requirement.
Maybe add it as an option to get_maintainer.pl --tree <hash> then that
would be very easy.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
2019-08-20 8:55 ` Dan Carpenter
@ 2019-08-20 9:25 ` Björn Töpel
2019-08-20 9:44 ` Dan Carpenter
0 siblings, 1 reply; 7+ messages in thread
From: Björn Töpel @ 2019-08-20 9:25 UTC (permalink / raw)
To: Dan Carpenter
Cc: Björn Töpel, YueHaibing, Karlsson, Magnus,
Jonathan Lemon, Alexei Starovoitov, Daniel Borkmann,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
Netdev, bpf, kernel-janitors
On Tue, 20 Aug 2019 at 10:59, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> On Tue, Aug 20, 2019 at 09:28:26AM +0200, Björn Töpel wrote:
> > For future patches: Prefix AF_XDP socket work with "xsk:" and use "PATCH
> > bpf-next" to let the developers know what tree you're aiming for.
>
> There are over 300 trees in linux-next. It impossible to try remember
> everyone's trees. No one else has this requirement.
>
Net/bpf are different, and I wanted to point that out to lessen the
burden for the maintainers. It's documented in:
Documentation/bpf/bpf_devel_QA.rst.
Documentation/networking/netdev-FAQ.rst
> Maybe add it as an option to get_maintainer.pl --tree <hash> then that
> would be very easy.
>
Yes, improved tooling would help.
Cheers,
Björn
> regards,
> dan carpenter
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
2019-08-20 9:25 ` Björn Töpel
@ 2019-08-20 9:44 ` Dan Carpenter
2019-08-20 11:46 ` Yuehaibing
0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2019-08-20 9:44 UTC (permalink / raw)
To: Björn Töpel
Cc: Björn Töpel, YueHaibing, Karlsson, Magnus,
Jonathan Lemon, Alexei Starovoitov, Daniel Borkmann,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
Netdev, bpf, kernel-janitors
On Tue, Aug 20, 2019 at 11:25:29AM +0200, Björn Töpel wrote:
> On Tue, 20 Aug 2019 at 10:59, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > On Tue, Aug 20, 2019 at 09:28:26AM +0200, Björn Töpel wrote:
> > > For future patches: Prefix AF_XDP socket work with "xsk:" and use "PATCH
> > > bpf-next" to let the developers know what tree you're aiming for.
> >
> > There are over 300 trees in linux-next. It impossible to try remember
> > everyone's trees. No one else has this requirement.
> >
>
> Net/bpf are different, and I wanted to point that out to lessen the
> burden for the maintainers. It's documented in:
>
> Documentation/bpf/bpf_devel_QA.rst.
> Documentation/networking/netdev-FAQ.rst
Ah... I hadn't realized that BPF patches were confusing to Dave.
I actually do keep track of net and net-next. I do quite a bit of extra
stuff for netdev patches. So what about if we used [PATCH] for bpf and
[PATCH net] and [PATCH net-next] for networking?
I will do that.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
2019-08-20 9:44 ` Dan Carpenter
@ 2019-08-20 11:46 ` Yuehaibing
0 siblings, 0 replies; 7+ messages in thread
From: Yuehaibing @ 2019-08-20 11:46 UTC (permalink / raw)
To: Dan Carpenter, Björn Töpel
Cc: Björn Töpel, Karlsson, Magnus, Jonathan Lemon,
Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
Yonghong Song, John Fastabend, Netdev, bpf, kernel-janitors
On 2019/8/20 17:44, Dan Carpenter wrote:
> On Tue, Aug 20, 2019 at 11:25:29AM +0200, Björn Töpel wrote:
>> On Tue, 20 Aug 2019 at 10:59, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>>>
>>> On Tue, Aug 20, 2019 at 09:28:26AM +0200, Björn Töpel wrote:
>>>> For future patches: Prefix AF_XDP socket work with "xsk:" and use "PATCH
>>>> bpf-next" to let the developers know what tree you're aiming for.
>>>
>>> There are over 300 trees in linux-next. It impossible to try remember
>>> everyone's trees. No one else has this requirement.
>>>
>>
>> Net/bpf are different, and I wanted to point that out to lessen the
>> burden for the maintainers. It's documented in:
>>
>> Documentation/bpf/bpf_devel_QA.rst.
>> Documentation/networking/netdev-FAQ.rst
>
> Ah... I hadn't realized that BPF patches were confusing to Dave.
>
> I actually do keep track of net and net-next. I do quite a bit of extra
> stuff for netdev patches. So what about if we used [PATCH] for bpf and
> [PATCH net] and [PATCH net-next] for networking?
>
> I will do that.
bpf-next is a good choice.
>
> regards,
> dan carpenter
>
> .
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
2019-08-20 1:36 [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc() YueHaibing
2019-08-20 7:28 ` Björn Töpel
@ 2019-08-20 15:09 ` Daniel Borkmann
1 sibling, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2019-08-20 15:09 UTC (permalink / raw)
To: YueHaibing, bjorn.topel, magnus.karlsson, jonathan.lemon, ast,
kafai, songliubraving, yhs, john.fastabend
Cc: netdev, bpf, kernel-janitors
On 8/20/19 3:36 AM, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-08-20 15:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 1:36 [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc() YueHaibing
2019-08-20 7:28 ` Björn Töpel
2019-08-20 8:55 ` Dan Carpenter
2019-08-20 9:25 ` Björn Töpel
2019-08-20 9:44 ` Dan Carpenter
2019-08-20 11:46 ` Yuehaibing
2019-08-20 15:09 ` 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).