* [dpdk-dev] [PATCH] vhost/crypto: fix build without cryptodev (shared lib)
@ 2018-10-16 16:54 Timothy Redaelli
2018-10-16 17:07 ` Maxime Coquelin
0 siblings, 1 reply; 2+ messages in thread
From: Timothy Redaelli @ 2018-10-16 16:54 UTC (permalink / raw)
To: Maxime Coquelin, Tiwei Bie, Zhihong Wang; +Cc: Fan Zhang, dev
Currently it's not possible to build DPDK as shared library with
cryptodev disabled since vhost is trying to link with rte_crypto,
but rte_crypto and rte_hash are only needed when you build vhost_crypto
and so only when cryptodev is enabled.
This patch fix this by linking rte_vhost with rte_crypto and rte_hash only
when cryptodev is enabled.
Fixes: b4ca81298613 ("vhost/crypto: fix build without cryptodev")
Fixes: d090c7f86a76 ("vhost/crypto: update makefile")
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
lib/librte_vhost/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 531cf4832..5dd318987 100644
--- a/lib/librte_vhost/Makefile
+++ b/lib/librte_vhost/Makefile
@@ -19,8 +19,7 @@ LDLIBS += -lpthread
ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
LDLIBS += -lnuma
endif
-LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \
- -lrte_cryptodev -lrte_hash
+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 \
@@ -31,6 +30,7 @@ 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)
+LDLIBS += -lrte_cryptodev -lrte_hash
SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_crypto.c
SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost_crypto.h
endif
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost/crypto: fix build without cryptodev (shared lib)
2018-10-16 16:54 [dpdk-dev] [PATCH] vhost/crypto: fix build without cryptodev (shared lib) Timothy Redaelli
@ 2018-10-16 17:07 ` Maxime Coquelin
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Coquelin @ 2018-10-16 17:07 UTC (permalink / raw)
To: Timothy Redaelli, Tiwei Bie, Zhihong Wang; +Cc: Fan Zhang, dev
On 10/16/2018 06:54 PM, Timothy Redaelli wrote:
> Currently it's not possible to build DPDK as shared library with
> cryptodev disabled since vhost is trying to link with rte_crypto,
> but rte_crypto and rte_hash are only needed when you build vhost_crypto
> and so only when cryptodev is enabled.
>
> This patch fix this by linking rte_vhost with rte_crypto and rte_hash only
> when cryptodev is enabled.
>
> Fixes: b4ca81298613 ("vhost/crypto: fix build without cryptodev")
> Fixes: d090c7f86a76 ("vhost/crypto: update makefile")
The above commit does not exist (check-git-log.sh reports an error).
I think this is the commit that should be mentioned:
Fixes: 939066d96563 ("vhost/crypto: add public function implementation")
Also, we need to cc stable@dpdk.org so that it gets backported to
v18.08.
Wit that fixed, please add my:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
>
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
> lib/librte_vhost/Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
> index 531cf4832..5dd318987 100644
> --- a/lib/librte_vhost/Makefile
> +++ b/lib/librte_vhost/Makefile
> @@ -19,8 +19,7 @@ LDLIBS += -lpthread
> ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
> LDLIBS += -lnuma
> endif
> -LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \
> - -lrte_cryptodev -lrte_hash
> +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 \
> @@ -31,6 +30,7 @@ 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)
> +LDLIBS += -lrte_cryptodev -lrte_hash
> SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_crypto.c
> SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost_crypto.h
> endif
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-16 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16 16:54 [dpdk-dev] [PATCH] vhost/crypto: fix build without cryptodev (shared lib) Timothy Redaelli
2018-10-16 17:07 ` Maxime Coquelin
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).