[dpdk-stable] [PATCH v3] eal: arm: fix out of tree build

Ruifeng Wang Ruifeng.Wang at arm.com
Tue Jun 8 11:56:20 CEST 2021


> -----Original Message-----
> From: Michael Pfeiffer <michael.pfeiffer at tu-ilmenau.de>
> Sent: Monday, June 7, 2021 2:53 PM
> To: Jan Viktorin <viktorin at rehivetech.com>; Ruifeng Wang
> <Ruifeng.Wang at arm.com>; jerinj at marvell.com
> Cc: dev at dpdk.org; Michael Pfeiffer <michael.pfeiffer at tu-ilmenau.de>;
> kosar at rehivetech.com; stable at dpdk.org
> Subject: [PATCH v3] eal: arm: fix out of tree build
> 
> Including rte_byteorder.h may fail for ARM builds with 'Platform must be
> built with RTE_FORCE_INTRINSICS' if rte_config.h is not included before.
> Include rte_config.h from rte_byteorder.h to solve the issue.
> 
> Fixes: de966ccdcd7f ("eal/arm: add byte order operations for ARM")
> Cc: kosar at rehivetech.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Michael Pfeiffer <michael.pfeiffer at tu-ilmenau.de>
> ---
> v3:
> * Proper in-reply-to.
> 
> v2:
> * Fixed subject line.
> * Add "Fixes:" and CC to stable.
> 
>  lib/eal/arm/include/rte_byteorder.h | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/eal/arm/include/rte_byteorder.h
> b/lib/eal/arm/include/rte_byteorder.h
> index df2f1d87ba..1f90db9943 100644
> --- a/lib/eal/arm/include/rte_byteorder.h
> +++ b/lib/eal/arm/include/rte_byteorder.h
> @@ -5,18 +5,19 @@
>  #ifndef _RTE_BYTEORDER_ARM_H_
>  #define _RTE_BYTEORDER_ARM_H_
> 
> -#ifndef RTE_FORCE_INTRINSICS
> -#  error Platform must be built with RTE_FORCE_INTRINSICS -#endif
> -
Moving of this section solves the problem.

>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> 
>  #include <stdint.h>
>  #include <rte_common.h>
> +#include <rte_config.h>
rte_config.h is included by rte_common.h in above line.

>  #include "generic/rte_byteorder.h"
> 
> +#ifndef RTE_FORCE_INTRINSICS
> +#  error Platform must be built with RTE_FORCE_INTRINSICS #endif
> +
>  /* fix missing __builtin_bswap16 for gcc older then 4.8 */  #if !(__GNUC__ >
> 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
> 
> --
> 2.31.1

I see similar issue in rte_atomic32.h/rte_atomic64.h/rte_spinlock.h/rte_ticketlock.h/rte_mcslock.h in lib/eal/arm/include.
Do you want to fix all these?
Thanks.


More information about the stable mailing list