vhost/crypto: fix Makefile
PATCH 1/1 vhost/crypto: fix Makefile
Vhost-Crypto shall not be compiled if rte_cryptodev is disabled. This patch fix this by adding checking to Makefile.
--- lib/librte_vhost/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
lib/librte_vhost/Makefile +8 -3
@@ -23,10 +23,15 @@ LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \ # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \ - vhost_user.c virtio_net.c vdpa.c vhost_crypto.c + vhost_user.c virtio_net.c vdpa.c # install includes -SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost.h rte_vdpa.h \ - rte_vhost_crypto.h +SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost.h rte_vdpa.h + +# only compile vhost crypto when cryptodev is enabled +ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y) +SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_crypto.c +SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost_crypto.h +endif include $(RTE_SDK)/mk/rte.lib.mk
Signature · 1 line
2.13.6
16/04/2018 16:08, Fan Zhang:
Quoted 9 lines
Fixes d090c7f86a76 ("vhost/crypto: update makefile")Vhost-Crypto shall not be compiled if
rte_cryptodevis disabled. This patch fix this by adding checking toMakefile.Signed-off-by Fan Zhang <[email protected]>--- lib/librte_vhost/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
What about meson.build?
Hi Thomas,
In fact Meson compile enables all library builds so you cannot turn off cryptodev manually. So the condition checking to disable vhost crypto build is not necessary.
Regards,
Fan
Quoted 22 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, April 16, 2018 10:43 PM
To: Zhang, Roy Fan <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Richardson, Bruce <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] vhost/crypto: fixMakefile16/04/2018 16:08, Fan Zhang:
Quoted 9 lines
Fixes d090c7f86a76 ("vhost/crypto: update makefile")Vhost-Crypto shall not be compiled if
rte_cryptodevis disabled. This patch fix this by adding checking toMakefile.Signed-off-by Fan Zhang <[email protected]>--- lib/librte_vhost/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)What about meson.build?
Quoted 6 lines · Thomas Monjalon
16/04/2018 16:08, Fan Zhang:
Quoted 5 lines
Fixes d090c7f86a76 ("vhost/crypto: update makefile")Vhost-Crypto shall not be compiled if
rte_cryptodevis disabled. This patch fix this by adding checking toMakefile.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Fan Zhang <[email protected]>--- lib/librte_vhost/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)What about meson.build?
It's not needed. Meson build does not allow you to go arbitrarily disabling libraries - exactly for this reason, to save us littering other build files with all sorts of checks for various libraries. Only those libraries which are unsupported on a particular platform need to be checked for - all core libraries are always available. I'm sure if you looked at it, we should have an awful lot more checks in our Makefiles for library disabling, not to mention the fact that EAL, mbuf, mempool libraries are possible to disable, even though doing so will result in an unbuildable mess.
/Bruce
16/04/2018 16:08, Fan Zhang:
Quoted 6 lines
Fixes d090c7f86a76 ("vhost/crypto: update makefile")Vhost-Crypto shall not be compiled if
rte_cryptodevis disabled. This patch fix this by adding checking toMakefile.Signed-off-by Fan Zhang <[email protected]>
Applied with title "vhost/crypto: fix build without cryptodev"
Note: "Fixes" line should be between the explanations and the SoB.
Thanks