* [PATCH bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf().
@ 2023-08-04 0:51 thinker.li
2023-08-04 1:41 ` Yonghong Song
2023-08-04 21:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: thinker.li @ 2023-08-04 0:51 UTC (permalink / raw)
To: bpf, ast, martin.lau, song, kernel-team, andrii
Cc: sinquersw, kuifeng, Kui-Feng Lee, Alexei Starovoitov
From: Kui-Feng Lee <thinker.li@gmail.com>
Fix inconsistent return types in two implementations of bpf_xdp_copy_buf().
There are two implementations: one is an empty implementation whose return
type does not match the actual implementation.
Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
---
include/linux/filter.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 2d6fe30bad5f..761af6b3cf2b 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -1572,10 +1572,9 @@ static inline void *bpf_xdp_pointer(struct xdp_buff *xdp, u32 offset, u32 len)
return NULL;
}
-static inline void *bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned long off, void *buf,
- unsigned long len, bool flush)
+static inline void bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned long off, void *buf,
+ unsigned long len, bool flush)
{
- return NULL;
}
#endif /* CONFIG_NET */
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf().
2023-08-04 0:51 [PATCH bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf() thinker.li
@ 2023-08-04 1:41 ` Yonghong Song
2023-08-04 17:25 ` Kui-Feng Lee
2023-08-04 21:50 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Yonghong Song @ 2023-08-04 1:41 UTC (permalink / raw)
To: thinker.li, bpf, ast, martin.lau, song, kernel-team, andrii
Cc: sinquersw, kuifeng, Alexei Starovoitov
On 8/3/23 5:51 PM, thinker.li@gmail.com wrote:
> From: Kui-Feng Lee <thinker.li@gmail.com>
>
> Fix inconsistent return types in two implementations of bpf_xdp_copy_buf().
>
> There are two implementations: one is an empty implementation whose return
> type does not match the actual implementation.
>
> Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Looks like a fix tag is not needed as the old code won't cause
compilation warnings or runtime errors despite the signature mismatch.
Acked-by: Yonghong Song <yonghong.song@linux.dev>
> ---
> include/linux/filter.h | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/filter.h b/include/linux/filter.h
> index 2d6fe30bad5f..761af6b3cf2b 100644
> --- a/include/linux/filter.h
> +++ b/include/linux/filter.h
> @@ -1572,10 +1572,9 @@ static inline void *bpf_xdp_pointer(struct xdp_buff *xdp, u32 offset, u32 len)
> return NULL;
> }
>
> -static inline void *bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned long off, void *buf,
> - unsigned long len, bool flush)
> +static inline void bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned long off, void *buf,
> + unsigned long len, bool flush)
> {
> - return NULL;
> }
> #endif /* CONFIG_NET */
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf().
2023-08-04 1:41 ` Yonghong Song
@ 2023-08-04 17:25 ` Kui-Feng Lee
0 siblings, 0 replies; 4+ messages in thread
From: Kui-Feng Lee @ 2023-08-04 17:25 UTC (permalink / raw)
To: yonghong.song, thinker.li, bpf, ast, martin.lau, song,
kernel-team, andrii
Cc: kuifeng, Alexei Starovoitov
On 8/3/23 18:41, Yonghong Song wrote:
>
>
> On 8/3/23 5:51 PM, thinker.li@gmail.com wrote:
>> From: Kui-Feng Lee <thinker.li@gmail.com>
>>
>> Fix inconsistent return types in two implementations of
>> bpf_xdp_copy_buf().
>>
>> There are two implementations: one is an empty implementation whose
>> return
>> type does not match the actual implementation.
>>
>> Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
>> Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
>
> Looks like a fix tag is not needed as the old code won't cause
> compilation warnings or runtime errors despite the signature mismatch.
>
> Acked-by: Yonghong Song <yonghong.song@linux.dev>
Thank you for the review!
>
>> ---
>> include/linux/filter.h | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/linux/filter.h b/include/linux/filter.h
>> index 2d6fe30bad5f..761af6b3cf2b 100644
>> --- a/include/linux/filter.h
>> +++ b/include/linux/filter.h
>> @@ -1572,10 +1572,9 @@ static inline void *bpf_xdp_pointer(struct
>> xdp_buff *xdp, u32 offset, u32 len)
>> return NULL;
>> }
>> -static inline void *bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned
>> long off, void *buf,
>> - unsigned long len, bool flush)
>> +static inline void bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned
>> long off, void *buf,
>> + unsigned long len, bool flush)
>> {
>> - return NULL;
>> }
>> #endif /* CONFIG_NET */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf().
2023-08-04 0:51 [PATCH bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf() thinker.li
2023-08-04 1:41 ` Yonghong Song
@ 2023-08-04 21:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-04 21:50 UTC (permalink / raw)
To: Kui-Feng Lee
Cc: bpf, ast, martin.lau, song, kernel-team, andrii, sinquersw,
kuifeng, alexei.starovoitov
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Martin KaFai Lau <martin.lau@kernel.org>:
On Thu, 3 Aug 2023 17:51:01 -0700 you wrote:
> From: Kui-Feng Lee <thinker.li@gmail.com>
>
> Fix inconsistent return types in two implementations of bpf_xdp_copy_buf().
>
> There are two implementations: one is an empty implementation whose return
> type does not match the actual implementation.
>
> [...]
Here is the summary with links:
- [bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf().
https://git.kernel.org/bpf/bpf-next/c/8a60a041eada
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-04 21:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-04 0:51 [PATCH bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf() thinker.li
2023-08-04 1:41 ` Yonghong Song
2023-08-04 17:25 ` Kui-Feng Lee
2023-08-04 21:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox