From patchwork Tue Oct 16 20:47:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 46913 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA3725689; Tue, 16 Oct 2018 22:47:51 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 2ACE54CA7; Tue, 16 Oct 2018 22:47:49 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6BE59308FB8F; Tue, 16 Oct 2018 20:47:48 +0000 (UTC) Received: from graphite.drizzt.lan (dhcp189-71.ntdv.lab.eng.bos.redhat.com [10.19.189.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87C9212A64; Tue, 16 Oct 2018 20:47:44 +0000 (UTC) From: Timothy Redaelli To: Maxime Coquelin , Tiwei Bie , Zhihong Wang Cc: Fan Zhang , dev@dpdk.org, stable@dpdk.org Date: Tue, 16 Oct 2018 22:47:16 +0200 Message-Id: <5cfae41059f6e9b52f424a1a1f6b0d3d41318e2a.1539722428.git.tredaelli@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 16 Oct 2018 20:47:48 +0000 (UTC) Subject: [dpdk-dev] [PATCH v2] vhost/crypto: fix build without cryptodev (shared lib) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "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: 939066d96563 ("vhost/crypto: add public function implementation") Cc: stable@dpdk.org Signed-off-by: Timothy Redaelli Reviewed-by: Maxime Coquelin --- v2: Fix the second 'Fixes' line. I wrongly copied that commit id from commit b4ca81298613, but it seems it's a commit not contained in any branch (as reported by Maxime and check-git-log.sh). --- 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