* [dpdk-dev] [PATCH] lib/bpf: fix clang build warnings for aarch64
@ 2019-11-15 3:18 Ruifeng Wang
2019-11-15 3:45 ` Jerin Jacob
2019-11-15 6:47 ` [dpdk-dev] [PATCH v2] " Ruifeng Wang
0 siblings, 2 replies; 5+ messages in thread
From: Ruifeng Wang @ 2019-11-15 3:18 UTC (permalink / raw)
To: jerinj, gavin.hu; +Cc: dev, honnappa.nagarahalli, nd, Ruifeng Wang, stable
Couple of warnings will block build when warnings been treated as errors.
Clang version 8.0 was used.
Warning messages during build:
../lib/librte_bpf/bpf_jit_arm64.c:1438:26: warning: incompatible pointer
types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
'char *' [-Wincompatible-pointer-types]
__builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
^~~~~~~
../lib/librte_bpf/bpf_jit_arm64.c:1438:35: warning: incompatible pointer
types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
'char *' [-Wincompatible-pointer-types]
__builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
^~~~~~~~~~~~~~~~~
Fixes: f3e516772464 ("bpf/arm: add prologue and epilogue")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
lib/librte_bpf/bpf_jit_arm64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_bpf/bpf_jit_arm64.c b/lib/librte_bpf/bpf_jit_arm64.c
index 8882fee67..a5a5d46f0 100644
--- a/lib/librte_bpf/bpf_jit_arm64.c
+++ b/lib/librte_bpf/bpf_jit_arm64.c
@@ -1435,7 +1435,7 @@ bpf_jit_arm64(struct rte_bpf *bpf)
}
/* Flush the icache */
- __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
+ __builtin___clear_cache((char *)ctx.ins, (char *)(ctx.ins + ctx.idx));
bpf->jit.func = (void *)ctx.ins;
bpf->jit.sz = size;
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] lib/bpf: fix clang build warnings for aarch64
2019-11-15 3:18 [dpdk-dev] [PATCH] lib/bpf: fix clang build warnings for aarch64 Ruifeng Wang
@ 2019-11-15 3:45 ` Jerin Jacob
2019-11-15 6:47 ` [dpdk-dev] [PATCH v2] " Ruifeng Wang
1 sibling, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2019-11-15 3:45 UTC (permalink / raw)
To: Ruifeng Wang
Cc: Jerin Jacob, Gavin Hu, dpdk-dev, Honnappa Nagarahalli, nd, stable
On Fri, Nov 15, 2019 at 8:48 AM Ruifeng Wang <ruifeng.wang@arm.com> wrote:
>
> Couple of warnings will block build when warnings been treated as errors.
> Clang version 8.0 was used.
>
> Warning messages during build:
> ../lib/librte_bpf/bpf_jit_arm64.c:1438:26: warning: incompatible pointer
> types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
> 'char *' [-Wincompatible-pointer-types]
> __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
> ^~~~~~~
> ../lib/librte_bpf/bpf_jit_arm64.c:1438:35: warning: incompatible pointer
> types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
> 'char *' [-Wincompatible-pointer-types]
> __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
> ^~~~~~~~~~~~~~~~~
>
> Fixes: f3e516772464 ("bpf/arm: add prologue and epilogue")
> Cc: stable@dpdk.org
No need to CC stable as this has been added in this release.
Is clang prototype for __builtin___clear_cache() different? If so,
update the git commit for the reason for the failure.
in gcc[1], it is void *.
[1]
void __builtin___clear_cache (void *begin, void *end)
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Reviewed-by: Phil Yang <phil.yang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] lib/bpf: fix clang build warnings for aarch64
2019-11-15 3:18 [dpdk-dev] [PATCH] lib/bpf: fix clang build warnings for aarch64 Ruifeng Wang
2019-11-15 3:45 ` Jerin Jacob
@ 2019-11-15 6:47 ` Ruifeng Wang
2019-11-15 7:14 ` Jerin Jacob
1 sibling, 1 reply; 5+ messages in thread
From: Ruifeng Wang @ 2019-11-15 6:47 UTC (permalink / raw)
To: jerinj, gavin.hu; +Cc: dev, honnappa.nagarahalli, nd, Ruifeng Wang
Clang has different prototype for __builtin___clear_cache(). It requires
'char *' parameters while gcc requires 'void *'.
Clang version 8.0 was used.
Warning messages during build:
../lib/librte_bpf/bpf_jit_arm64.c:1438:26: warning: incompatible pointer
types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
'char *' [-Wincompatible-pointer-types]
__builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
^~~~~~~
../lib/librte_bpf/bpf_jit_arm64.c:1438:35: warning: incompatible pointer
types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
'char *' [-Wincompatible-pointer-types]
__builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
^~~~~~~~~~~~~~~~~
Fixes: f3e516772464 ("bpf/arm: add prologue and epilogue")
Cc: jerinj@marvell.com
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
v2:
Update commit message for failure reason. (Jerin)
lib/librte_bpf/bpf_jit_arm64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_bpf/bpf_jit_arm64.c b/lib/librte_bpf/bpf_jit_arm64.c
index 8882fee67..a5a5d46f0 100644
--- a/lib/librte_bpf/bpf_jit_arm64.c
+++ b/lib/librte_bpf/bpf_jit_arm64.c
@@ -1435,7 +1435,7 @@ bpf_jit_arm64(struct rte_bpf *bpf)
}
/* Flush the icache */
- __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
+ __builtin___clear_cache((char *)ctx.ins, (char *)(ctx.ins + ctx.idx));
bpf->jit.func = (void *)ctx.ins;
bpf->jit.sz = size;
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] lib/bpf: fix clang build warnings for aarch64
2019-11-15 6:47 ` [dpdk-dev] [PATCH v2] " Ruifeng Wang
@ 2019-11-15 7:14 ` Jerin Jacob
2019-11-20 23:32 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Jerin Jacob @ 2019-11-15 7:14 UTC (permalink / raw)
To: Ruifeng Wang; +Cc: Jerin Jacob, Gavin Hu, dpdk-dev, Honnappa Nagarahalli, nd
On Fri, Nov 15, 2019 at 12:18 PM Ruifeng Wang <ruifeng.wang@arm.com> wrote:
>
> Clang has different prototype for __builtin___clear_cache(). It requires
> 'char *' parameters while gcc requires 'void *'.
>
> Clang version 8.0 was used.
> Warning messages during build:
> ../lib/librte_bpf/bpf_jit_arm64.c:1438:26: warning: incompatible pointer
> types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
> 'char *' [-Wincompatible-pointer-types]
> __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
> ^~~~~~~
> ../lib/librte_bpf/bpf_jit_arm64.c:1438:35: warning: incompatible pointer
> types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
> 'char *' [-Wincompatible-pointer-types]
> __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
> ^~~~~~~~~~~~~~~~~
>
> Fixes: f3e516772464 ("bpf/arm: add prologue and epilogue")
> Cc: jerinj@marvell.com
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Reviewed-by: Phil Yang <phil.yang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
> ---
> v2:
> Update commit message for failure reason. (Jerin)
>
> lib/librte_bpf/bpf_jit_arm64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_bpf/bpf_jit_arm64.c b/lib/librte_bpf/bpf_jit_arm64.c
> index 8882fee67..a5a5d46f0 100644
> --- a/lib/librte_bpf/bpf_jit_arm64.c
> +++ b/lib/librte_bpf/bpf_jit_arm64.c
> @@ -1435,7 +1435,7 @@ bpf_jit_arm64(struct rte_bpf *bpf)
> }
>
> /* Flush the icache */
> - __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
> + __builtin___clear_cache((char *)ctx.ins, (char *)(ctx.ins + ctx.idx));
>
> bpf->jit.func = (void *)ctx.ins;
> bpf->jit.sz = size;
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] lib/bpf: fix clang build warnings for aarch64
2019-11-15 7:14 ` Jerin Jacob
@ 2019-11-20 23:32 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2019-11-20 23:32 UTC (permalink / raw)
To: Ruifeng Wang
Cc: dev, Jerin Jacob, Jerin Jacob, Gavin Hu, Honnappa Nagarahalli, nd
15/11/2019 08:14, Jerin Jacob:
> On Fri, Nov 15, 2019 at 12:18 PM Ruifeng Wang <ruifeng.wang@arm.com> wrote:
> >
> > Clang has different prototype for __builtin___clear_cache(). It requires
> > 'char *' parameters while gcc requires 'void *'.
> >
> > Clang version 8.0 was used.
> > Warning messages during build:
> > ../lib/librte_bpf/bpf_jit_arm64.c:1438:26: warning: incompatible pointer
> > types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
> > 'char *' [-Wincompatible-pointer-types]
> > __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
> > ^~~~~~~
> > ../lib/librte_bpf/bpf_jit_arm64.c:1438:35: warning: incompatible pointer
> > types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
> > 'char *' [-Wincompatible-pointer-types]
> > __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
> > ^~~~~~~~~~~~~~~~~
> >
> > Fixes: f3e516772464 ("bpf/arm: add prologue and epilogue")
> > Cc: jerinj@marvell.com
> >
> > Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > Reviewed-by: Phil Yang <phil.yang@arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
>
> Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-20 23:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 3:18 [dpdk-dev] [PATCH] lib/bpf: fix clang build warnings for aarch64 Ruifeng Wang
2019-11-15 3:45 ` Jerin Jacob
2019-11-15 6:47 ` [dpdk-dev] [PATCH v2] " Ruifeng Wang
2019-11-15 7:14 ` Jerin Jacob
2019-11-20 23:32 ` Thomas Monjalon
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).