patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] drivers/crypto: fix build with make
@ 2020-02-27 22:33 Thomas Monjalon
  2020-02-28 12:24 ` Akhil Goyal
  2020-02-28 13:25 ` [dpdk-stable] [PATCH v2] drivers/crypto: fix build with make 4.3 Thomas Monjalon
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Monjalon @ 2020-02-27 22:33 UTC (permalink / raw)
  To: dev
  Cc: roy.fan.zhang, pablo.de.lara.guarch, bruce.richardson, stable,
	Declan Doherty, Luca Boccassi, Akhil Goyal

In the check for the version of intel-ipsec-mb library,
there is a backslash in front of the #include.
It is not clear why this backslash is for.
It is not clear why there was no error so far.

In an up-to-date ArchLinux, these errors were seen:

syntax error near unexpected token `|'
`grep -e "IMB_VERSION_STR" \#include <intel-ipsec-mb.h> | cut -d'"' -f2'
syntax error near unexpected token `|'
`grep -e "IMB_VERSION_NUM" \#include <intel-ipsec-mb.h> | cut -d' ' -f3'

The makefiles are fixed by removing the backslash.

Fixes: 3067c8ce77ac ("crypto/aesni_mb: fix build with custom dependency path")
Fixes: 457b8e372975 ("crypto/aesni_gcm: check dependency version with make")
Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/crypto/aesni_gcm/Makefile | 2 +-
 drivers/crypto/aesni_mb/Makefile  | 2 +-
 drivers/crypto/kasumi/Makefile    | 2 +-
 drivers/crypto/snow3g/Makefile    | 2 +-
 drivers/crypto/zuc/Makefile       | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
index d8190a2ff4..e80a416261 100644
--- a/drivers/crypto/aesni_gcm/Makefile
+++ b/drivers/crypto/aesni_gcm/Makefile
@@ -20,7 +20,7 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#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)
 
diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index f1530e74c4..d81e5671df 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -20,7 +20,7 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#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)
 
diff --git a/drivers/crypto/kasumi/Makefile b/drivers/crypto/kasumi/Makefile
index c94d6bdcf9..5b71481784 100644
--- a/drivers/crypto/kasumi/Makefile
+++ b/drivers/crypto/kasumi/Makefile
@@ -20,7 +20,7 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#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)
 
diff --git a/drivers/crypto/snow3g/Makefile b/drivers/crypto/snow3g/Makefile
index 438119c3d5..b3807e4314 100644
--- a/drivers/crypto/snow3g/Makefile
+++ b/drivers/crypto/snow3g/Makefile
@@ -20,7 +20,7 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#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)
 
diff --git a/drivers/crypto/zuc/Makefile b/drivers/crypto/zuc/Makefile
index b50883b2a7..ae0e1a2c2a 100644
--- a/drivers/crypto/zuc/Makefile
+++ b/drivers/crypto/zuc/Makefile
@@ -20,7 +20,7 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#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)
 
-- 
2.25.1


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

* Re: [dpdk-stable] [PATCH] drivers/crypto: fix build with make
  2020-02-27 22:33 [dpdk-stable] [PATCH] drivers/crypto: fix build with make Thomas Monjalon
@ 2020-02-28 12:24 ` Akhil Goyal
  2020-02-28 12:41   ` Thomas Monjalon
  2020-02-28 13:25 ` [dpdk-stable] [PATCH v2] drivers/crypto: fix build with make 4.3 Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Akhil Goyal @ 2020-02-28 12:24 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: roy.fan.zhang, pablo.de.lara.guarch, bruce.richardson, stable,
	Declan Doherty, Luca Boccassi

Hi Thomas,

> 
> In the check for the version of intel-ipsec-mb library,
> there is a backslash in front of the #include.
> It is not clear why this backslash is for.
> It is not clear why there was no error so far.
> 
> In an up-to-date ArchLinux, these errors were seen:
> 
> syntax error near unexpected token `|'
> `grep -e "IMB_VERSION_STR" \#include <intel-ipsec-mb.h> | cut -d'"' -f2'
> syntax error near unexpected token `|'
> `grep -e "IMB_VERSION_NUM" \#include <intel-ipsec-mb.h> | cut -d' ' -f3'
> 
> The makefiles are fixed by removing the backslash.
> 
> Fixes: 3067c8ce77ac ("crypto/aesni_mb: fix build with custom dependency path")
> Fixes: 457b8e372975 ("crypto/aesni_gcm: check dependency version with make")
> Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
> Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
> Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

I see that CI is still failing after removing that backslash.
I believe the issue is not because of backslash. It is something else.

Regards,
Akhil


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

* Re: [dpdk-stable] [PATCH] drivers/crypto: fix build with make
  2020-02-28 12:24 ` Akhil Goyal
@ 2020-02-28 12:41   ` Thomas Monjalon
  2020-02-28 12:56     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2020-02-28 12:41 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: dev, roy.fan.zhang, pablo.de.lara.guarch, bruce.richardson,
	stable, Declan Doherty, Luca Boccassi

28/02/2020 13:24, Akhil Goyal:
> Hi Thomas,
> 
> > 
> > In the check for the version of intel-ipsec-mb library,
> > there is a backslash in front of the #include.
> > It is not clear why this backslash is for.
> > It is not clear why there was no error so far.
> > 
> > In an up-to-date ArchLinux, these errors were seen:
> > 
> > syntax error near unexpected token `|'
> > `grep -e "IMB_VERSION_STR" \#include <intel-ipsec-mb.h> | cut -d'"' -f2'
> > syntax error near unexpected token `|'
> > `grep -e "IMB_VERSION_NUM" \#include <intel-ipsec-mb.h> | cut -d' ' -f3'
> > 
> > The makefiles are fixed by removing the backslash.
> > 
> > Fixes: 3067c8ce77ac ("crypto/aesni_mb: fix build with custom dependency path")
> > Fixes: 457b8e372975 ("crypto/aesni_gcm: check dependency version with make")
> > Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
> > Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
> > Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> 
> I see that CI is still failing after removing that backslash.

Yes my patch is failing on Intel CI:
	http://mails.dpdk.org/archives/test-report/2020-February/118888.html

I caught this issue on my machine.

> I believe the issue is not because of backslash. It is something else.

It works on my machine.

We need to find a solution which works on both environment.
Maybe the cause is using make 4.3 on my machine.



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

* Re: [dpdk-stable] [PATCH] drivers/crypto: fix build with make
  2020-02-28 12:41   ` Thomas Monjalon
@ 2020-02-28 12:56     ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2020-02-28 12:56 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: dev, roy.fan.zhang, pablo.de.lara.guarch, bruce.richardson,
	stable, Declan Doherty, Luca Boccassi

28/02/2020 13:41, Thomas Monjalon:
> 28/02/2020 13:24, Akhil Goyal:
> > Hi Thomas,
> > 
> > > 
> > > In the check for the version of intel-ipsec-mb library,
> > > there is a backslash in front of the #include.
> > > It is not clear why this backslash is for.
> > > It is not clear why there was no error so far.
> > > 
> > > In an up-to-date ArchLinux, these errors were seen:
> > > 
> > > syntax error near unexpected token `|'
> > > `grep -e "IMB_VERSION_STR" \#include <intel-ipsec-mb.h> | cut -d'"' -f2'
> > > syntax error near unexpected token `|'
> > > `grep -e "IMB_VERSION_NUM" \#include <intel-ipsec-mb.h> | cut -d' ' -f3'
> > > 
> > > The makefiles are fixed by removing the backslash.
> > > 
> > > Fixes: 3067c8ce77ac ("crypto/aesni_mb: fix build with custom dependency path")
> > > Fixes: 457b8e372975 ("crypto/aesni_gcm: check dependency version with make")
> > > Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
> > > Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
> > > Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")
> > > Cc: stable@dpdk.org
> > > 
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > > ---
> > 
> > I see that CI is still failing after removing that backslash.
> 
> Yes my patch is failing on Intel CI:
> 	http://mails.dpdk.org/archives/test-report/2020-February/118888.html
> 
> I caught this issue on my machine.
> 
> > I believe the issue is not because of backslash. It is something else.
> 
> It works on my machine.
> 
> We need to find a solution which works on both environment.
> Maybe the cause is using make 4.3 on my machine.

I confirm the issue:
"
* WARNING: Backward-incompatibility!
  Number signs (#) appearing inside a macro reference or function invocation
  no longer introduce comments and should not be escaped with backslashes:
  thus a call such as:
    foo := $(shell echo '#')
  is legal.  Previously the number sign needed to be escaped, for example:
    foo := $(shell echo '\#')
  Now this latter will resolve to "\#".  If you want to write makefiles
  portable to both versions, assign the number sign to a variable:
    H := \#
    foo := $(shell echo '$H')
  This was claimed to be fixed in 3.81, but wasn't, for some reason.
  To detect this change search for 'nocomment' in the .FEATURES variable.
"
https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html

I will send a v2 patch




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

* [dpdk-stable] [PATCH v2] drivers/crypto: fix build with make 4.3
  2020-02-27 22:33 [dpdk-stable] [PATCH] drivers/crypto: fix build with make Thomas Monjalon
  2020-02-28 12:24 ` Akhil Goyal
@ 2020-02-28 13:25 ` Thomas Monjalon
  2020-03-12  8:05   ` Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2020-02-28 13:25 UTC (permalink / raw)
  To: dev
  Cc: roy.fan.zhang, pablo.de.lara.guarch, bruce.richardson, stable,
	Declan Doherty, Luca Boccassi, Akhil Goyal

In the check for the version of intel-ipsec-mb library,
there is a backslash in front of the #include.
This backslash is for escaping the hash sign parsed as
a number sign in make.

Since make-4.3, escaping is not required for the number sign.
As a consequence, it resolves now to '\#':

syntax error near unexpected token `|'
`grep -e "IMB_VERSION_STR" \#include <intel-ipsec-mb.h> | cut -d'"' -f2'
syntax error near unexpected token `|'
`grep -e "IMB_VERSION_NUM" \#include <intel-ipsec-mb.h> | cut -d' ' -f3'

The makefiles are fixed by using a variable for the hash sign,
as recommended in make-4.3 changelog:
	https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html

Fixes: 3067c8ce77ac ("crypto/aesni_mb: fix build with custom dependency path")
Fixes: 457b8e372975 ("crypto/aesni_gcm: check dependency version with make")
Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---

v2:
- found the root cause in make-4.3
- use $H for compatibility with make < 4.3

Note the list of "Fixes" references are here to help backporting,
even if there was no bug before the recent release of make-4.3.

---
 drivers/crypto/aesni_gcm/Makefile | 3 ++-
 drivers/crypto/aesni_mb/Makefile  | 3 ++-
 drivers/crypto/kasumi/Makefile    | 3 ++-
 drivers/crypto/snow3g/Makefile    | 3 ++-
 drivers/crypto/zuc/Makefile       | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
index d8190a2ff4..b443167d51 100644
--- a/drivers/crypto/aesni_gcm/Makefile
+++ b/drivers/crypto/aesni_gcm/Makefile
@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
+H := \#
+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
 	head -n1 | cut -d'"' -f2)
 
diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index f1530e74c4..aa2e428106 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
+H := \#
+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
 	head -n1 | cut -d'"' -f2)
 
diff --git a/drivers/crypto/kasumi/Makefile b/drivers/crypto/kasumi/Makefile
index c94d6bdcf9..ad19aad11c 100644
--- a/drivers/crypto/kasumi/Makefile
+++ b/drivers/crypto/kasumi/Makefile
@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
+H := \#
+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
 	head -n1 | cut -d'"' -f2)
 
diff --git a/drivers/crypto/snow3g/Makefile b/drivers/crypto/snow3g/Makefile
index 438119c3d5..cbf1a77904 100644
--- a/drivers/crypto/snow3g/Makefile
+++ b/drivers/crypto/snow3g/Makefile
@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
+H := \#
+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
 	head -n1 | cut -d'"' -f2)
 
diff --git a/drivers/crypto/zuc/Makefile b/drivers/crypto/zuc/Makefile
index b50883b2a7..1875344472 100644
--- a/drivers/crypto/zuc/Makefile
+++ b/drivers/crypto/zuc/Makefile
@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
+H := \#
+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
 	head -n1 | cut -d'"' -f2)
 
-- 
2.25.1


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

* Re: [dpdk-stable] [PATCH v2] drivers/crypto: fix build with make 4.3
  2020-02-28 13:25 ` [dpdk-stable] [PATCH v2] drivers/crypto: fix build with make 4.3 Thomas Monjalon
@ 2020-03-12  8:05   ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2020-03-12  8:05 UTC (permalink / raw)
  To: dev
  Cc: stable, roy.fan.zhang, pablo.de.lara.guarch, bruce.richardson,
	Declan Doherty, Luca Boccassi, Akhil Goyal

28/02/2020 14:25, Thomas Monjalon:
> In the check for the version of intel-ipsec-mb library,
> there is a backslash in front of the #include.
> This backslash is for escaping the hash sign parsed as
> a number sign in make.
> 
> Since make-4.3, escaping is not required for the number sign.
> As a consequence, it resolves now to '\#':
> 
> syntax error near unexpected token `|'
> `grep -e "IMB_VERSION_STR" \#include <intel-ipsec-mb.h> | cut -d'"' -f2'
> syntax error near unexpected token `|'
> `grep -e "IMB_VERSION_NUM" \#include <intel-ipsec-mb.h> | cut -d' ' -f3'
> 
> The makefiles are fixed by using a variable for the hash sign,
> as recommended in make-4.3 changelog:
> 	https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html
> 
> Fixes: 3067c8ce77ac ("crypto/aesni_mb: fix build with custom dependency path")
> Fixes: 457b8e372975 ("crypto/aesni_gcm: check dependency version with make")
> Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
> Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
> Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> 
> v2:
> - found the root cause in make-4.3
> - use $H for compatibility with make < 4.3
> 
> Note the list of "Fixes" references are here to help backporting,
> even if there was no bug before the recent release of make-4.3.

I was expecting some reviews and a merge in the crypto tree.
Given it is blocking me to merge any other patch,
after waiting 2 weeks,
Applied in master branch.



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

end of thread, other threads:[~2020-03-12  8:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 22:33 [dpdk-stable] [PATCH] drivers/crypto: fix build with make Thomas Monjalon
2020-02-28 12:24 ` Akhil Goyal
2020-02-28 12:41   ` Thomas Monjalon
2020-02-28 12:56     ` Thomas Monjalon
2020-02-28 13:25 ` [dpdk-stable] [PATCH v2] drivers/crypto: fix build with make 4.3 Thomas Monjalon
2020-03-12  8:05   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).