From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 2A93C1B650 for ; Tue, 30 Jan 2018 16:35:04 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id i186so1987536wmi.4 for ; Tue, 30 Jan 2018 07:35:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=DxbEUGu2ZhJ+iQ1FQs8TPGtO2gICNeHZzd/RCa+Sv7E=; b=1rRVvCPwHRycjN5rvEmCA+ILH9NKJFiXZd7zX8HqdG1HC8FZipNTxo2xqEMGRohAwE 9dV212NVdJiitp22lwWjrUu3pMkf+7vpsWgC2PXX5br7+miXenV75lPY/ZzvGcBZgPxC 7xJ2y533RUV+UShajYtLEGB15w/flA5IBrYNXdfPPIaywTsJtrGpYihTC8cGV9u5a2jN nN1ZLaxAI3uODeXf+gaDxpRkk/0hFa3zBWE15WbYrZbn+XxzhlQ2W+1hAdC4JkYLPOAX PHE1dIioyEhzDN1QFMNLsL0nojJsHkuv6vM5AZvFsfy6teiKaFNma+uDlY3WgmaESv6/ 1F5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DxbEUGu2ZhJ+iQ1FQs8TPGtO2gICNeHZzd/RCa+Sv7E=; b=ADb+4angXpQ9EjPdp0m7uoj6EGtBZMG5QGsW5iX0uc5oBVmaMcHzmAqJWhZO+M25kZ FTDBK9FKeMW8isNzkATZmjYQulq0APdINdRxUuUpUx3xXmun/hS8VplP7bo9t5fuHGD7 vR9U9nSK+upOZvAeHGUDtJ+nVlS8PTM78Aoqzrwff3IXb4+dmQ12K3LML9Bp0gcTPJNw D8Ly6NFxRWK4Bz5zkaRwS82YJFp0ncG0kU1KRi8v9Pn7CU87X/d2b8EoP6B+pbamDhHU GPdUN2EZSFf32HJChdYjD4TnHc2e2rXI/qquO9an/ZSCwM+1IG088tkiWy/UD8c3YRG2 p4ww== X-Gm-Message-State: AKwxytf6x5jrEae4wruElthI1gKhBmtfFhtFL+GaJIr54Dd3JcEbc42J cbCQK1Mptt/uA8KSVSIgWvASxg== X-Google-Smtp-Source: AH8x226e9Q9RNcNMotWuogWw2uP2Pw76hk9lGT3IfA753UmHLZZCNhXFpf0Fn8i2bxfsXVY3cob4qg== X-Received: by 10.28.167.5 with SMTP id q5mr23049920wme.90.1517326503824; Tue, 30 Jan 2018 07:35:03 -0800 (PST) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id c49sm21841928wrc.48.2018.01.30.07.35.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 07:35:03 -0800 (PST) Date: Tue, 30 Jan 2018 16:34:50 +0100 From: Adrien Mazarguil To: Shahaf Shuler Cc: Nelio Laranjeiro , dev@dpdk.org, Marcelo Ricardo Leitner Message-ID: <20180130144512.21872-1-adrien.mazarguil@6wind.com> References: <20180129170310.14142-1-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180129170310.14142-1-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH v4 0/4] net/mlx: make rdma-core optional at run-time 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: , X-List-Received-Date: Tue, 30 Jan 2018 15:35:04 -0000 A problem encountered with Mellanox PMDs and frequently reported by DPDK application developers and Linux distribution package maintainers is their dependency on rdma-core components, namely libibverbs, libmlx4, and libmlx5. For best performance in applications, DPDK is normally built as a collection of library archives (.a files), whose external dependencies are inherited through rte.app.mk during link. When these PMDs are built-in, any binary DPDK package, whether DPDK itself or derived applications, always have to pull rdma-core. This dependency is not obvious and may be missed during the packaging of any intermediate layer between DPDK itself and the end application. While still required during compilation, this series trades this hard dependency for an optional one, dynamically loaded at run-time through dlopen(). It supersedes Shachar's previous work on the same topic [1] using a different approach in order to preserve symbol versioning and address the remaining issues. [1] http://dpdk.org/ml/archives/dev/2017-December/085090.html v4 changes: - Addressed remaining compilation issue against MLNX_OFED due to missing function definitions in mlx5. - Fixed sign of errno code returned by glue functions when counters are not supported. v3 changes: - Rebased on dpdk-next-net-mlx. - Modified patches to generate mlx4/mlx5 glue objects as independent libraries to install on the target system (they are not generated at run time anymore) in order to address security concerns. - As a consequence, glue libraries generation is now disabled by default and binary distributions must take care of properly packaging them if enabled. v2 changes: - Rebased on dpdk-next-net-mlx. - Rely on CONFIG_RTE_LIBRTE_MLX[45]_DLOPEN_DEPS instead of CONFIG_RTE_BUILD_SHARED_LIB to enable this mode, so it can be overridden if necessary. - Fixed -lmlx5 -libibverbs leftovers in rte.app.mk. - Minor fixes for indentation and unnecessary includes in mlx5. Adrien Mazarguil (3): net/mlx4: move rdma-core calls to separate file net/mlx4: spawn rdma-core dependency plug-in net/mlx5: spawn rdma-core dependency plug-in Nelio Laranjeiro (1): net/mlx5: move rdma-core calls to separate file config/common_base | 2 + doc/guides/nics/mlx4.rst | 13 ++ doc/guides/nics/mlx5.rst | 13 ++ drivers/net/mlx4/Makefile | 30 +++ drivers/net/mlx4/mlx4.c | 84 +++++++-- drivers/net/mlx4/mlx4_ethdev.c | 3 +- drivers/net/mlx4/mlx4_flow.c | 32 ++-- drivers/net/mlx4/mlx4_glue.c | 275 ++++++++++++++++++++++++++++ drivers/net/mlx4/mlx4_glue.h | 80 ++++++++ drivers/net/mlx4/mlx4_intr.c | 10 +- drivers/net/mlx4/mlx4_mr.c | 7 +- drivers/net/mlx4/mlx4_rxq.c | 53 +++--- drivers/net/mlx4/mlx4_txq.c | 17 +- drivers/net/mlx5/Makefile | 30 +++ drivers/net/mlx5/mlx5.c | 92 +++++++--- drivers/net/mlx5/mlx5_ethdev.c | 7 +- drivers/net/mlx5/mlx5_flow.c | 92 +++++----- drivers/net/mlx5/mlx5_glue.c | 352 ++++++++++++++++++++++++++++++++++++ drivers/net/mlx5/mlx5_glue.h | 106 +++++++++++ drivers/net/mlx5/mlx5_mr.c | 7 +- drivers/net/mlx5/mlx5_rxq.c | 54 +++--- drivers/net/mlx5/mlx5_txq.c | 22 ++- drivers/net/mlx5/mlx5_vlan.c | 13 +- mk/rte.app.mk | 8 + 24 files changed, 1217 insertions(+), 185 deletions(-) create mode 100644 drivers/net/mlx4/mlx4_glue.c create mode 100644 drivers/net/mlx4/mlx4_glue.h create mode 100644 drivers/net/mlx5/mlx5_glue.c create mode 100644 drivers/net/mlx5/mlx5_glue.h -- 2.11.0