From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 07EB7C666 for ; Thu, 30 Jul 2015 16:49:19 +0200 (CEST) Received: by wibxm9 with SMTP id xm9so248240895wib.0 for ; Thu, 30 Jul 2015 07:49:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ogdbw1JKQOU4NhBEBN9pON5pN2oNJXVCtoeOXkxUEnY=; b=bYzDLhc4Umj+WsjR/816bmJPhOLSwqfJcxnFOI9+/PCQ/6qkuBSQfyR2pJptIC/6+1 RR/S15pVtbLyRkwYUrtvXgI3MzSpc4/PlwwqXlvvndrVFqGzoyrQIP0COz1sKT0S3kuq 4eveF3nsOu9iqTsUPCjPSYooIFoGqrMD/g1ecFLbtvl65+r2RMMsFQshBZ6EzlB09L1V oq3UMOSQnF0pjJ07oxh0B2t1bVD8zwoHOoZTTAlrHuVKR99OU5u4xWYiR7vEY31ZHiIH vcNDYJK/w+6faZ9rwamCpuspT5CUE/QKd/DLd67OiklwNz228rixTzLB2esLzCRkQmPb KvDw== X-Gm-Message-State: ALoCoQkbOqIo6ttxwkqsPZbRQpmbtxCKj+J2f8HFMwjbbfmBA0MlDh8OnszRo3cD7Ve7XL3ufpvC X-Received: by 10.194.81.137 with SMTP id a9mr31250678wjy.155.1438267759715; Thu, 30 Jul 2015 07:49:19 -0700 (PDT) Received: from ping.vm.6wind.com (6wind.net2.nerim.net. [213.41.151.210]) by smtp.gmail.com with ESMTPSA id c11sm30275570wib.1.2015.07.30.07.49.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2015 07:49:19 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Date: Thu, 30 Jul 2015 16:48:24 +0200 Message-Id: <1438267704-26414-2-git-send-email-nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438267704-26414-1-git-send-email-nelio.laranjeiro@6wind.com> References: <1438178178-5062-1-git-send-email-nelio.laranjeiro@6wind.com> <1438267704-26414-1-git-send-email-nelio.laranjeiro@6wind.com> Subject: [dpdk-dev] [PACTH v2 2/2] mlx4: fix shared library dependency X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2015 14:49:20 -0000 librte_pmd_mlx4.so needs to be linked with libiverbs otherwise, the PMD is not able to open Mellanox devices and the following message is printed by testpmd at startup "librte_pmd_mlx4: cannot access device, is mlx4_ib loaded?". Applications dependency on libverbs are moved to be only valid in static mode, in shared mode, applications do not depend on it anymore, librte_pmd_mlx4.so keeps this dependency and thus is linked with libverbs. Signed-off-by: Nelio Laranjeiro Acked-by: Olivier Matz --- Changelog: don't compiled MLX4 PMD when the DPDK is build in combined shared library. doc/guides/nics/mlx4.rst | 5 +++++ drivers/net/Makefile | 6 +++++- drivers/net/mlx4/Makefile | 1 + mk/rte.app.mk | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst index c33aa38..840cb65 100644 --- a/doc/guides/nics/mlx4.rst +++ b/doc/guides/nics/mlx4.rst @@ -47,6 +47,11 @@ There is also a `section dedicated to this poll mode driver be enabled manually by setting ``CONFIG_RTE_LIBRTE_MLX4_PMD=y`` and recompiling DPDK. +.. warning:: + + ``CONFIG_RTE_BUILD_COMBINE_LIBS`` is not supported (if set, it will not + compile this PMD even if ``CONFIG_RTE_LIBRTE_MLX4_PMD`` is set). + Implementation details ---------------------- diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 5ebf963..1725c94 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -40,7 +40,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe -DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 DIRS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += mpipe DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap @@ -49,5 +48,10 @@ DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt +# Drivers not support in combined mode +ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) +DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 +endif + include $(RTE_SDK)/mk/rte.sharelib.mk include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index 14cb53f..d2f5692 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -50,6 +50,7 @@ CFLAGS += -g CFLAGS += -I. CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -libverbs # A few warnings cannot be avoided in external headers. CFLAGS += -Wno-error=cast-qual diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 97719cb..04af756 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -100,7 +100,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse endif -_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs _LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lz _LDLIBS-y += --start-group @@ -140,6 +139,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING) += -lrte_pmd_ring _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += -lrte_pmd_af_packet _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += -lrte_pmd_null +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB) -- 1.9.1