[v2] crypto/aesni_mb: fix compile

Message ID 20190121155611.74873-1-roy.fan.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] crypto/aesni_mb: fix compile |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Fan Zhang Jan. 21, 2019, 3:56 p.m. UTC
  This patch fixes the inflexible compile issue AESNI-MB PMD.
Originally the compile of the PMD will fail if IPSec_MB is
not installed in default location.

Fixes: c68d7aa354f6 ("crypto/aesni_mb: use architecture independent macros")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
v2:
- uses standard head invocation

 drivers/crypto/aesni_mb/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Ananyev, Konstantin Jan. 21, 2019, 10:42 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang
> Sent: Monday, January 21, 2019 3:56 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com
> Subject: [dpdk-dev] [PATCH v2] crypto/aesni_mb: fix compile
> 
> This patch fixes the inflexible compile issue AESNI-MB PMD.
> Originally the compile of the PMD will fail if IPSec_MB is
> not installed in default location.
> 
> Fixes: c68d7aa354f6 ("crypto/aesni_mb: use architecture independent macros")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> v2:
> - uses standard head invocation
> 
>  drivers/crypto/aesni_mb/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
> index 7ef290dc5..8d2024c9e 100644
> --- a/drivers/crypto/aesni_mb/Makefile
> +++ b/drivers/crypto/aesni_mb/Makefile
> @@ -23,7 +23,9 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
>  LDLIBS += -lrte_cryptodev
>  LDLIBS += -lrte_bus_vdev
> 
> -IMB_HDR = /usr/include/intel-ipsec-mb.h
> +IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
> +	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
> +	head -n1 | cut -d'"' -f2)
> 
>  # Detect library version
>  IMB_VERSION = $(shell grep -e "IMB_VERSION_STR" $(IMB_HDR) | cut -d'"' -f2)
> --

Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.13.6
  
Thomas Monjalon Jan. 22, 2019, 4:29 p.m. UTC | #2
> > This patch fixes the inflexible compile issue AESNI-MB PMD.
> > Originally the compile of the PMD will fail if IPSec_MB is
> > not installed in default location.
> > 
> > Fixes: c68d7aa354f6 ("crypto/aesni_mb: use architecture independent macros")
> > 
> > Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> > Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks
  

Patch

diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index 7ef290dc5..8d2024c9e 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -23,7 +23,9 @@  LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = /usr/include/intel-ipsec-mb.h
+IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
+	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
+	head -n1 | cut -d'"' -f2)
 
 # Detect library version
 IMB_VERSION = $(shell grep -e "IMB_VERSION_STR" $(IMB_HDR) | cut -d'"' -f2)