patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 19.11.7] build: fix scheduler macro definition for meson
@ 2021-03-10 10:53 Ciara Power
  2021-03-10 11:03 ` Richardson, Bruce
  0 siblings, 1 reply; 2+ messages in thread
From: Ciara Power @ 2021-03-10 10:53 UTC (permalink / raw)
  To: stable
  Cc: christian.ehrhardt, Ciara Power, bruce.richardson,
	Declan Doherty, Thomas Monjalon

The make and meson macro formats differ slightly,
the make format is checked when registering the scheduler_autotest
command, and when including dependency on the scheduler pmd for the test,
l2fwd-crypto and test-crypto-perf apps. When building with meson,
these things were not done, and the scheduler autotest was unavailable.

To fix this, the scheduler macro in make format is also defined when
using meson, and the meson build files for the apps use the meson format
when adding the scheduler dependency.

A generalised fix patch [1] for this issue didn't make it into 19.11.6,
but given that does not apply cleanly and introduces other unwanted
changes, this patch is an alternative fix for the scheduler test issue
only.

Fixes: 4dfc61fe367c ("app: fix missing dependencies")
Fixes: dcadbbde8e61 ("crypto/null: build with meson")
Fixes: 52e2991eab28 ("examples/l2fwd-crypto: fix missing dependency")
Cc: bruce.richardson@intel.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>

---
[1]
inbox.dpdk.org/dev/20201015150554.950838-4-bruce.richardson@intel.com/
---
 app/test-crypto-perf/meson.build  | 2 +-
 app/test/meson.build              | 2 +-
 config/rte_config.h               | 4 ++++
 examples/l2fwd-crypto/meson.build | 2 +-
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index c416091fdd..dcc4bf9cbc 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -13,6 +13,6 @@ sources = files('cperf_ops.c',
 		'cperf_test_verify.c',
 		'main.c')
 deps += ['cryptodev', 'security']
-if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
+if dpdk_conf.has('RTE_LIBRTE_CRYPTO_SCHEDULER_PMD')
 	deps += 'pmd_crypto_scheduler'
 endif
diff --git a/app/test/meson.build b/app/test/meson.build
index df94b4d48f..24fb59f74f 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -378,7 +378,7 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV')
 	endif
 endif
 
-if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
+if dpdk_conf.has('RTE_LIBRTE_CRYPTO_SCHEDULER_PMD')
 	driver_test_names += 'cryptodev_scheduler_autotest'
 	test_deps += 'pmd_crypto_scheduler'
 endif
diff --git a/config/rte_config.h b/config/rte_config.h
index 0f9dae3ba2..8ec0a58f19 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -94,6 +94,10 @@
 #define RTE_SCHED_PORT_N_GRINDERS 8
 #undef RTE_SCHED_VECTOR
 
+#ifdef RTE_LIBRTE_CRYPTO_SCHEDULER_PMD
+#define RTE_LIBRTE_PMD_CRYPTO_SCHEDULER 1
+#endif
+
 /* KNI defines */
 #define RTE_KNI_PREEMPT_DEFAULT 1
 
diff --git a/examples/l2fwd-crypto/meson.build b/examples/l2fwd-crypto/meson.build
index 39e1604fac..c08d8469b4 100644
--- a/examples/l2fwd-crypto/meson.build
+++ b/examples/l2fwd-crypto/meson.build
@@ -7,7 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'cryptodev'
-if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
+if dpdk_conf.has('RTE_LIBRTE_CRYPTO_SCHEDULER_PMD')
 	deps += 'pmd_crypto_scheduler'
 endif
 allow_experimental_apis = true
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 19.11.7] build: fix scheduler macro definition for meson
  2021-03-10 10:53 [dpdk-stable] [PATCH 19.11.7] build: fix scheduler macro definition for meson Ciara Power
@ 2021-03-10 11:03 ` Richardson, Bruce
  0 siblings, 0 replies; 2+ messages in thread
From: Richardson, Bruce @ 2021-03-10 11:03 UTC (permalink / raw)
  To: Power, Ciara, stable; +Cc: christian.ehrhardt, Doherty, Declan, Thomas Monjalon



> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Wednesday, March 10, 2021 10:54 AM
> To: stable@dpdk.org
> Cc: christian.ehrhardt@canonical.com; Power, Ciara
> <ciara.power@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>;
> Doherty, Declan <declan.doherty@intel.com>; Thomas Monjalon
> <thomas@monjalon.net>
> Subject: [PATCH 19.11.7] build: fix scheduler macro definition for meson
> 
> The make and meson macro formats differ slightly,
> the make format is checked when registering the scheduler_autotest
> command, and when including dependency on the scheduler pmd for the test,
> l2fwd-crypto and test-crypto-perf apps. When building with meson,
> these things were not done, and the scheduler autotest was unavailable.
> 

I think that this paragraph needs clarifying a bit, in particular to make it clear that meson build files are checking the "make" macro. 
It might also be useful to actually give the "make" and "meson" definitions for clarity.

> To fix this, the scheduler macro in make format is also defined when
> using meson, and the meson build files for the apps use the meson format
> when adding the scheduler dependency.
> 
> A generalised fix patch [1] for this issue didn't make it into 19.11.6,
> but given that does not apply cleanly and introduces other unwanted
> changes, this patch is an alternative fix for the scheduler test issue
> only.
> 
> Fixes: 4dfc61fe367c ("app: fix missing dependencies")
> Fixes: dcadbbde8e61 ("crypto/null: build with meson")
> Fixes: 52e2991eab28 ("examples/l2fwd-crypto: fix missing dependency")
> Cc: bruce.richardson@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ciara Power <ciara.power@intel.com>
> 

For this simple approach:
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

One further comment below.

> ---
> [1]
> inbox.dpdk.org/dev/20201015150554.950838-4-bruce.richardson@intel.com/
> ---
>  app/test-crypto-perf/meson.build  | 2 +-
>  app/test/meson.build              | 2 +-
>  config/rte_config.h               | 4 ++++
>  examples/l2fwd-crypto/meson.build | 2 +-
>  4 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-
> perf/meson.build
> index c416091fdd..dcc4bf9cbc 100644
> --- a/app/test-crypto-perf/meson.build
> +++ b/app/test-crypto-perf/meson.build
> @@ -13,6 +13,6 @@ sources = files('cperf_ops.c',
>  		'cperf_test_verify.c',
>  		'main.c')
>  deps += ['cryptodev', 'security']
> -if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
> +if dpdk_conf.has('RTE_LIBRTE_CRYPTO_SCHEDULER_PMD')
>  	deps += 'pmd_crypto_scheduler'
>  endif
> diff --git a/app/test/meson.build b/app/test/meson.build
> index df94b4d48f..24fb59f74f 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> @@ -378,7 +378,7 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV')
>  	endif
>  endif
> 
> -if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
> +if dpdk_conf.has('RTE_LIBRTE_CRYPTO_SCHEDULER_PMD')
>  	driver_test_names += 'cryptodev_scheduler_autotest'
>  	test_deps += 'pmd_crypto_scheduler'
>  endif
> diff --git a/config/rte_config.h b/config/rte_config.h
> index 0f9dae3ba2..8ec0a58f19 100644
> --- a/config/rte_config.h
> +++ b/config/rte_config.h
> @@ -94,6 +94,10 @@
>  #define RTE_SCHED_PORT_N_GRINDERS 8
>  #undef RTE_SCHED_VECTOR
> 
> +#ifdef RTE_LIBRTE_CRYPTO_SCHEDULER_PMD

I think you should add a comment here explaining that this is the macro defined by make, and added here for compatibility.

> +#define RTE_LIBRTE_PMD_CRYPTO_SCHEDULER 1
> +#endif
> +
>  /* KNI defines */
>  #define RTE_KNI_PREEMPT_DEFAULT 1
> 
> diff --git a/examples/l2fwd-crypto/meson.build b/examples/l2fwd-
> crypto/meson.build
> index 39e1604fac..c08d8469b4 100644
> --- a/examples/l2fwd-crypto/meson.build
> +++ b/examples/l2fwd-crypto/meson.build
> @@ -7,7 +7,7 @@
>  # DPDK instance, use 'make'
> 
>  deps += 'cryptodev'
> -if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
> +if dpdk_conf.has('RTE_LIBRTE_CRYPTO_SCHEDULER_PMD')
>  	deps += 'pmd_crypto_scheduler'
>  endif
>  allow_experimental_apis = true
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-10 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 10:53 [dpdk-stable] [PATCH 19.11.7] build: fix scheduler macro definition for meson Ciara Power
2021-03-10 11:03 ` Richardson, Bruce

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/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 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

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


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