[dpdk-dev] [PATCH] mempool/octeontx2: fix clang build failure
Jerin Jacob Kollanukkaran
jerinj at marvell.com
Thu Jul 4 14:05:16 CEST 2019
> -----Original Message-----
> From: pbhagavatula at marvell.com <pbhagavatula at marvell.com>
> Sent: Wednesday, July 3, 2019 10:22 PM
> To: Jerin Jacob Kollanukkaran <jerinj at marvell.com>
> Cc: dev at dpdk.org; Pavan Nikhilesh Bhagavatula
> <pbhagavatula at 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 at 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 at arm.com>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
> Signed-off-by: Jerin Jacob <jerinj at 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 at marvell.com>
More information about the dev
mailing list