DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Subject: Re: [dpdk-dev] [PATCH] mempool/octeontx2: fix clang build failure
Date: Thu, 4 Jul 2019 12:05:16 +0000	[thread overview]
Message-ID: <BYAPR18MB2424D0B9AD204407EC7363E5C8FA0@BYAPR18MB2424.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20190703165220.1068-1-pbhagavatula@marvell.com>

> -----Original Message-----
> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> Sent: Wednesday, July 3, 2019 10:22 PM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@marvell.com>
> Subject: [dpdk-dev][PATCH] mempool/octeontx2: fix clang build failure

Subject could be: mempool/octeontx2: fix arm64 clang build failure


> 
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> The ARMv8.1 CASP instruction works with even register pairs and since there
> no register constraint in older versions of GCC/Clang, use explicit register
> allocation to satisfy CASP requirements.
> 
> Fixs build issue with arm64-armv8a-linux-clang.

Typo

> 
> Fixes: ee338015e7a9 ("mempool/octeontx2: add optimized dequeue
> operation for arm64")
> 
> Reported-by: Gavin Hu <gavin.hu@arm.com>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> ---
> 
> Upstreamed gcc fix:
> https://github.com/gcc-mirror/gcc/commit/a1bdb8f296aac911
> 
>  drivers/mempool/octeontx2/otx2_mempool_ops.c | 278 +++++++++--------
> --
>  1 file changed, 127 insertions(+), 151 deletions(-)
> 
> diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c
> b/drivers/mempool/octeontx2/otx2_mempool_ops.c
> index 97146d1fe..e1764b030 100644
> --- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
> +++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
> @@ -54,233 +54,206 @@ npa_lf_aura_op_search_alloc(const int64_t wdata,
> int64_t * const addr,
>  	return 0;
>  }
> 
> -/*
> - * Some versions of the compiler don't have support for __int128_t for
> - * CASP inline-asm. i.e. if the optimization level is reduced to -O0 the
> - * CASP restrictions aren't followed and the compiler might end up violation
> the
> - * CASP rules. Fix it by explicitly providing ((optimize("-O3"))).
> - *
> - * Example:
> - * ccSPMGzq.s:1648: Error: reg pair must start from even reg at
> - * operand 1 - `casp x21,x22,x0,x1,[x19]'
> - */
> -static  __attribute__((optimize("-O3"))) __rte_noinline int __hot

Better to mention optimize(-O3) removed due lack of clang support.

> -#endif
> +
> +#else

Let otx2_npa_deq build for all cases to catch any issue in early stage(i.e avoid case where building on arm64 not on x86 case)

With above fixes:
Acked-by: Jerin Jacob <jerinj@marvell.com>





      parent reply	other threads:[~2019-07-04 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 16:52 pbhagavatula
2019-07-03 16:54 ` Pavan Nikhilesh Bhagavatula
2019-07-04 12:05 ` Jerin Jacob Kollanukkaran [this message]

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=BYAPR18MB2424D0B9AD204407EC7363E5C8FA0@BYAPR18MB2424.namprd18.prod.outlook.com \
    --to=jerinj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@marvell.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).