From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 419CEA04C5; Fri, 15 Nov 2019 08:14:23 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 316735B3A; Fri, 15 Nov 2019 08:14:22 +0100 (CET) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id 3B7F654AE for ; Fri, 15 Nov 2019 08:14:20 +0100 (CET) Received: by mail-il1-f194.google.com with SMTP id s5so8295773iln.4 for ; Thu, 14 Nov 2019 23:14:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KdRiye9xrRKz6WtDW5FxA6dbbbVU8beon5qbEajXaV0=; b=ZkrNJx3t4vFw8cg6+ZAfi8iYKdqUpUf0JIKBpp21/0WRcI++R7+zwBZfSf0uVW4VrO fmqETCxvzjj199Zd8MZjLlYBT5YobejED5PuFw4TevsOAYJ2uOYP5txzdtlQMN/+Qs0I VPKZBFL+SIqdjxo37b+PcwQ1y73EPrFqasSaxi0lT0wx82tYmtOwRAI7H8nsrv90kSzX R4mMGLdegYQjLMy5HRrs6CGeboEc9IY9e8AI4n4mK2keh54WSk6eUtjU1QX1wkNiPK0M R8g/NjNpD1dS4D5UcGVAFWZGP4GmT6zCnzLpGGxWDcJ8dDTSy8ZSPBgQEBntCB7uDnBo yKTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KdRiye9xrRKz6WtDW5FxA6dbbbVU8beon5qbEajXaV0=; b=DJjbiSr6JsO0IstF/L9VR4qlkhfey2Pr+oKpjzig++hBCuftthms9j6lSqxjDcrvOa PrkDDcrmvar/Axx/bhmVPsxfOv5IB2l8SKCZgObX06EaUmar9Ecw9mT2y1Vk6wXh6IdN knXjystEOgJf6JhLJ1hICMH9uN4awugdz1g1sSr0PrH3Dz9f369qhk9Eu1g7Q61zTppB uZ/8dqduRQ8B1D3V1RlvZzsn7F3xcTJ8xHbJLPFAbbtgoakKYUzGYJEIe6rQ0leZyZr/ htLBbokfmG6M99kmYnct+CHunLdOHvBNFt6Du28lWHSwiAt1oqiPBWr7g3UlLjw/C5co tikA== X-Gm-Message-State: APjAAAU098asJnbN5+USm+u8Y02rUhKhqPRSPUw/BVIZrXT8rcI6nqNn awkojczGltv2fO6xmAObKHGzYJlZdVBK1t6oC8k= X-Google-Smtp-Source: APXvYqwciigGbx8GqIs+wuL7o6EEKXEQk/vFnp0XIbmfPmwndxXnUAn/EOq6s7KPD42SzXW6Vjc7jzDu+a7PS9WxKsE= X-Received: by 2002:a92:5e49:: with SMTP id s70mr15290144ilb.130.1573802059247; Thu, 14 Nov 2019 23:14:19 -0800 (PST) MIME-Version: 1.0 References: <20191115031801.83730-1-ruifeng.wang@arm.com> <20191115064754.57605-1-ruifeng.wang@arm.com> In-Reply-To: <20191115064754.57605-1-ruifeng.wang@arm.com> From: Jerin Jacob Date: Fri, 15 Nov 2019 12:44:03 +0530 Message-ID: To: Ruifeng Wang Cc: Jerin Jacob , Gavin Hu , dpdk-dev , Honnappa Nagarahalli , nd Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] lib/bpf: fix clang build warnings for aarch64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Nov 15, 2019 at 12:18 PM Ruifeng Wang 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 > Reviewed-by: Phil Yang > Reviewed-by: Gavin Hu Acked-by: Jerin Jacob > --- > 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 >