From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id E28481B1B4 for ; Wed, 24 Jan 2018 16:37:36 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9A12E223C0; Wed, 24 Jan 2018 10:37:36 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:37:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=rOztfsu+PJ1rMbMxk i1Bublg4a79uc3U7ykmojHwnl8=; b=Kylcn1YknwVlzy9MoAXuJYkYmYEE60gum NXYPw8IncX2fpm6iN+Xd4EcMybJWmU10b9K0c4TPj9g6Sc/HECT7BQjBBTuzheyW W/zOarcS8gAjsPHaoM6ydgjXoB9g5z2tPksaO0zgBUkOr/m6rbwNU9gyQk9GqvPb V6eyMrwmCF0lfbPAmqOgakwgudUVCF4LdOxaZpPIfeevIuHXAucUXsZ+bcQN1XhC zzmlEqg0N2h3zlnHUskDwq3vaYF8Sklw8xpuDu4aQBpcsaZFhLwuFTBWbp5mTHoh cXvoH8Vs//5DyKIXOa5yuxueRLD/5JvDGo6YE68yKqwYiYsquiyhA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=rOztfsu+PJ1rMbMxki1Bublg4a79uc3U7ykmojHwnl8=; b=HOd93dvo xO7mY9uyH0T5vdT5wf30g5CXkc2Z9jccGQzEW5OAzBPL6gjA5lXMYGySkXga/wte gPGRHvNR5dlsQCSshyHvsgxLxD6WhX04Qdqkph5BK25cl722ZiX4F4CY7ZlOzEaJ w8r6deNOhc6xpecENxwMIP/H/4yn9RDaib7oDtXWynJwMJQGlmlo9kntcHnJ3Sb2 Yr8dVDgqNyekgSvBEpoBom/JHyd0pIHSIT4ART2N281lUfp1j6wJ/hx7F1z1rhA4 bvsnDcSoFeyyco4k0fB9oPiosW9K6ZO5ve1/V642NcSAU31SO+5Q2iOOtWu2OVL1 a1lF7m1E9hnarw== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id E207D7E448; Wed, 24 Jan 2018 10:37:33 -0500 (EST) From: Yuanhan Liu To: Matan Azrad Cc: Adrien Mazarguil , dpdk stable Date: Wed, 24 Jan 2018 23:31:48 +0800 Message-Id: <1516808026-25523-40-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/mlx4: revert workaround for broken Verbs' has been queued to LTS release 17.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 15:37:37 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 92a6ceb8e91ecf50b344d2a50f52dad7f0a07288 Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Wed, 29 Nov 2017 09:21:26 +0000 Subject: [PATCH] net/mlx4: revert workaround for broken Verbs [ upstream commit c2b3dba84ad319003df04a5a9fa163a953224e83 ] This workaround was needed to properly handle device removal with old Mellanox OFED releases that are not supported by this PMD anymore. Starting from rdma-core v16 this removal issue shouldn't happen when setting MLX4_DEVICE_FATAL_CLEANUP environment variable to 1. Set the aforementioned variable to 1. Reverts: 5f4677c6ad5e ("net/mlx4: workaround verbs error after plug-out") Signed-off-by: Matan Azrad Acked-by: Adrien Mazarguil --- config/common_base | 1 - doc/guides/nics/mlx4.rst | 8 -------- drivers/net/mlx4/Makefile | 4 ---- drivers/net/mlx4/mlx4.c | 6 ++++++ drivers/net/mlx4/mlx4_utils.h | 6 ------ 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/config/common_base b/config/common_base index e74febe..b8ee8f9 100644 --- a/config/common_base +++ b/config/common_base @@ -230,7 +230,6 @@ CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y # CONFIG_RTE_LIBRTE_MLX4_PMD=n CONFIG_RTE_LIBRTE_MLX4_DEBUG=n -CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS=n CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8 # diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst index 22341b9..cab45df 100644 --- a/doc/guides/nics/mlx4.rst +++ b/doc/guides/nics/mlx4.rst @@ -92,14 +92,6 @@ These options can be modified in the ``.config`` file. adds additional run-time checks and debugging messages at the cost of lower performance. -- ``CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS`` (default **n**) - - Mellanox OFED versions earlier than 4.2 may return false errors from - Verbs object destruction APIs after the device is plugged out. - Enabling this option replaces assertion checks that cause the program - to abort with harmless debugging messages as a workaround. - Relevant only when CONFIG_RTE_LIBRTE_MLX4_DEBUG is enabled. - - ``CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE`` (default **8**) Maximum number of cached memory pools (MPs) per TX queue. Each MP from diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index f1f47c2..1f95e0d 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -82,10 +82,6 @@ ifdef CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE CFLAGS += -DMLX4_PMD_TX_MP_CACHE=$(CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE) endif -ifeq ($(CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS),y) -CFLAGS += -DMLX4_PMD_DEBUG_BROKEN_VERBS -endif - include $(RTE_SDK)/mk/rte.lib.mk # Generate and clean-up mlx4_autoconf.h. diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index f9e4f9d..97dac64 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -708,6 +708,12 @@ static void rte_mlx4_pmd_init(void) { /* + * MLX4_DEVICE_FATAL_CLEANUP tells ibv_destroy functions we + * want to get success errno value in case of calling them + * when the device was removed. + */ + setenv("MLX4_DEVICE_FATAL_CLEANUP", "1", 1); + /* * RDMAV_HUGEPAGES_SAFE tells ibv_fork_init() we intend to use * huge pages. Calling ibv_fork_init() during init allows * applications to use fork() safely for purposes other than diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h index dc529c9..4f11405 100644 --- a/drivers/net/mlx4/mlx4_utils.h +++ b/drivers/net/mlx4/mlx4_utils.h @@ -70,13 +70,7 @@ pmd_drv_log_basename(const char *s) __func__, \ RTE_FMT_TAIL(__VA_ARGS__,))) #define DEBUG(...) PMD_DRV_LOG(DEBUG, __VA_ARGS__) -#ifndef MLX4_PMD_DEBUG_BROKEN_VERBS #define claim_zero(...) assert((__VA_ARGS__) == 0) -#else /* MLX4_PMD_DEBUG_BROKEN_VERBS */ -#define claim_zero(...) \ - (void)(((__VA_ARGS__) == 0) || \ - DEBUG("Assertion `(" # __VA_ARGS__ ") == 0' failed (IGNORED).")) -#endif /* MLX4_PMD_DEBUG_BROKEN_VERBS */ #else /* NDEBUG */ -- 2.7.4