DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ruifeng Wang <Ruifeng.Wang@arm.com>
To: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>,
	Jan Viktorin <viktorin@rehivetech.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"kosar@rehivetech.com" <kosar@rehivetech.com>,
	"stable@dpdk.org" <stable@dpdk.org>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v4] eal: arm: fix out of tree build
Date: Wed, 9 Jun 2021 07:27:35 +0000
Message-ID: <AM5PR0802MB2465836B21F39CE9F81D09389E369@AM5PR0802MB2465.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20210608102901.156032-1-michael.pfeiffer@tu-ilmenau.de>

> -----Original Message-----
> From: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
> Sent: Tuesday, June 8, 2021 6:29 PM
> To: Jan Viktorin <viktorin@rehivetech.com>; Ruifeng Wang
> <Ruifeng.Wang@arm.com>; jerinj@marvell.com
> Cc: dev@dpdk.org; Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>;
> kosar@rehivetech.com; stable@dpdk.org
> Subject: [PATCH v4] eal: arm: fix out of tree build
> 
> Including various headers may fail for ARM builds with 'Platform must be built
> with RTE_FORCE_INTRINSICS' if rte_config.h is not included before. Move
> the error message after the includes to ensure rte_config.h is always
> included.
> 
> Fixes: de966ccdcd7f ("eal/arm: add byte order operations for ARM")
Thanks for the patch.
More fix lines should be added:
Fixes: 17d5fa0fa90d ("eal/arm: add atomic operations for ARMv7")
Fixes: d708f01b7102 ("eal/arm: add atomic operations for ARMv8")
Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation")
Fixes: 7860c3965483 ("eal/arm: add spinlock operations for ARM")
Fixes: ca49b92079df ("ticketlock: enable generic ticketlock on all arch")

With the change:
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>

> Cc: kosar@rehivetech.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
> ---
> v4:
> * Apply to fix to rte_atomic_{32,64}.h, rte_{mcs,spin,ticket}lock.h as
>   well.
> * Remove unnecessary include of rte_config.h.
> * Adjust commit message.
> 
> v3:
> * Proper in-reply-to.
> 
> v2:
> * Fixed subject line.
> 
>  lib/eal/arm/include/rte_atomic_32.h  | 8 ++++----
> lib/eal/arm/include/rte_atomic_64.h  | 8 ++++----
> lib/eal/arm/include/rte_byteorder.h  | 8 ++++----
>  lib/eal/arm/include/rte_mcslock.h    | 8 ++++----
>  lib/eal/arm/include/rte_spinlock.h   | 8 ++++----
>  lib/eal/arm/include/rte_ticketlock.h | 8 ++++----
>  6 files changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/lib/eal/arm/include/rte_atomic_32.h
> b/lib/eal/arm/include/rte_atomic_32.h
> index c00ab78dba..138abd3a8b 100644
> --- a/lib/eal/arm/include/rte_atomic_32.h
> +++ b/lib/eal/arm/include/rte_atomic_32.h
> @@ -5,16 +5,16 @@
>  #ifndef _RTE_ATOMIC_ARM32_H_
>  #define _RTE_ATOMIC_ARM32_H_
> 
> -#ifndef RTE_FORCE_INTRINSICS
> -#  error Platform must be built with RTE_FORCE_INTRINSICS -#endif
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> 
>  #include "generic/rte_atomic.h"
> 
> +#ifndef RTE_FORCE_INTRINSICS
> +#  error Platform must be built with RTE_FORCE_INTRINSICS #endif
> +
>  #define	rte_mb()  __sync_synchronize()
> 
>  #define	rte_wmb() do { asm volatile ("dmb st" : : : "memory"); } while
> (0)
> diff --git a/lib/eal/arm/include/rte_atomic_64.h
> b/lib/eal/arm/include/rte_atomic_64.h
> index fa6f334c0d..2907a95196 100644
> --- a/lib/eal/arm/include/rte_atomic_64.h
> +++ b/lib/eal/arm/include/rte_atomic_64.h
> @@ -6,10 +6,6 @@
>  #ifndef _RTE_ATOMIC_ARM64_H_
>  #define _RTE_ATOMIC_ARM64_H_
> 
> -#ifndef RTE_FORCE_INTRINSICS
> -#  error Platform must be built with RTE_FORCE_INTRINSICS -#endif
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> @@ -19,6 +15,10 @@ extern "C" {
>  #include <rte_compat.h>
>  #include <rte_debug.h>
> 
> +#ifndef RTE_FORCE_INTRINSICS
> +#  error Platform must be built with RTE_FORCE_INTRINSICS #endif
> +
>  #define rte_mb() asm volatile("dmb osh" : : : "memory")
> 
>  #define rte_wmb() asm volatile("dmb oshst" : : : "memory") diff --git
> a/lib/eal/arm/include/rte_byteorder.h
> b/lib/eal/arm/include/rte_byteorder.h
> index df2f1d87ba..c00bebf680 100644
> --- a/lib/eal/arm/include/rte_byteorder.h
> +++ b/lib/eal/arm/include/rte_byteorder.h
> @@ -5,10 +5,6 @@
>  #ifndef _RTE_BYTEORDER_ARM_H_
>  #define _RTE_BYTEORDER_ARM_H_
> 
> -#ifndef RTE_FORCE_INTRINSICS
> -#  error Platform must be built with RTE_FORCE_INTRINSICS -#endif
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> @@ -17,6 +13,10 @@ extern "C" {
>  #include <rte_common.h>
>  #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))
> 
> diff --git a/lib/eal/arm/include/rte_mcslock.h
> b/lib/eal/arm/include/rte_mcslock.h
> index 896d678073..915a3ed647 100644
> --- a/lib/eal/arm/include/rte_mcslock.h
> +++ b/lib/eal/arm/include/rte_mcslock.h
> @@ -5,16 +5,16 @@
>  #ifndef _RTE_MCSLOCK_ARM_H_
>  #define _RTE_MCSLOCK_ARM_H_
> 
> -#ifndef RTE_FORCE_INTRINSICS
> -#  error Platform must be built with RTE_FORCE_INTRINSICS -#endif
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> 
>  #include "generic/rte_mcslock.h"
> 
> +#ifndef RTE_FORCE_INTRINSICS
> +#  error Platform must be built with RTE_FORCE_INTRINSICS #endif
> +
>  #ifdef __cplusplus
>  }
>  #endif
> diff --git a/lib/eal/arm/include/rte_spinlock.h
> b/lib/eal/arm/include/rte_spinlock.h
> index a973763c23..e29ddab89a 100644
> --- a/lib/eal/arm/include/rte_spinlock.h
> +++ b/lib/eal/arm/include/rte_spinlock.h
> @@ -5,10 +5,6 @@
>  #ifndef _RTE_SPINLOCK_ARM_H_
>  #define _RTE_SPINLOCK_ARM_H_
> 
> -#ifndef RTE_FORCE_INTRINSICS
> -#  error Platform must be built with RTE_FORCE_INTRINSICS -#endif
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> @@ -16,6 +12,10 @@ extern "C" {
>  #include <rte_common.h>
>  #include "generic/rte_spinlock.h"
> 
> +#ifndef RTE_FORCE_INTRINSICS
> +#  error Platform must be built with RTE_FORCE_INTRINSICS #endif
> +
>  static inline int rte_tm_supported(void)  {
>  	return 0;
> diff --git a/lib/eal/arm/include/rte_ticketlock.h
> b/lib/eal/arm/include/rte_ticketlock.h
> index e66beefbe2..22eb40fb66 100644
> --- a/lib/eal/arm/include/rte_ticketlock.h
> +++ b/lib/eal/arm/include/rte_ticketlock.h
> @@ -5,16 +5,16 @@
>  #ifndef _RTE_TICKETLOCK_ARM_H_
>  #define _RTE_TICKETLOCK_ARM_H_
> 
> -#ifndef RTE_FORCE_INTRINSICS
> -#  error Platform must be built with RTE_FORCE_INTRINSICS -#endif
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> 
>  #include "generic/rte_ticketlock.h"
> 
> +#ifndef RTE_FORCE_INTRINSICS
> +#  error Platform must be built with RTE_FORCE_INTRINSICS #endif
> +
>  #ifdef __cplusplus
>  }
>  #endif
> --
> 2.32.0


  reply	other threads:[~2021-06-09  7:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 11:47 [dpdk-dev] [PATCH] eal: add include for rte_byteorder on ARM Michael Pfeiffer
2021-06-06 17:56 ` Jerin Jacob
2021-06-07  6:53   ` [dpdk-dev] [PATCH v3] eal: arm: fix out of tree build Michael Pfeiffer
2021-06-08  9:56     ` Ruifeng Wang
2021-06-08 10:29       ` [dpdk-dev] [PATCH v4] " Michael Pfeiffer
2021-06-09  7:27         ` Ruifeng Wang [this message]
2021-06-09 10:17           ` [dpdk-dev] [PATCH v5] " Michael Pfeiffer
2021-06-09 10:22             ` Ruifeng Wang
2021-06-09 11:43             ` Jerin Jacob
2021-06-11  9:54             ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-06-11  9:59               ` Bruce Richardson
2021-06-11 10:27                 ` Michael Pfeiffer
2021-06-11 10:44                   ` Ruifeng Wang

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=AM5PR0802MB2465836B21F39CE9F81D09389E369@AM5PR0802MB2465.eurprd08.prod.outlook.com \
    --to=ruifeng.wang@arm.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kosar@rehivetech.com \
    --cc=michael.pfeiffer@tu-ilmenau.de \
    --cc=nd@arm.com \
    --cc=stable@dpdk.org \
    --cc=viktorin@rehivetech.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git