DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Ruifeng Wang <ruifeng.wang@arm.com>
Cc: Jerin Jacob <jerinj@marvell.com>, Gavin Hu <gavin.hu@arm.com>,
	dpdk-dev <dev@dpdk.org>,
	 Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2] lib/bpf: fix clang build warnings for aarch64
Date: Fri, 15 Nov 2019 12:44:03 +0530	[thread overview]
Message-ID: <CALBAE1MKZrdrLMo35vck=cU3RhwNOhHiubk90adZ2_8kFaAh+A@mail.gmail.com> (raw)
In-Reply-To: <20191115064754.57605-1-ruifeng.wang@arm.com>

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
>

  reply	other threads:[~2019-11-15  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15  3:18 [dpdk-dev] [PATCH] " 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 [this message]
2019-11-20 23:32     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALBAE1MKZrdrLMo35vck=cU3RhwNOhHiubk90adZ2_8kFaAh+A@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=gavin.hu@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).