]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx4: revert workaround for broken Verbs
authorMatan Azrad <matan@mellanox.com>
Wed, 29 Nov 2017 09:21:26 +0000 (09:21 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
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")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
config/common_base
doc/guides/nics/mlx4.rst
drivers/net/mlx4/Makefile
drivers/net/mlx4/mlx4.c
drivers/net/mlx4/mlx4_utils.h

index e74febef4848cd6554dc7a7f8ffdedf66d3406e0..b8ee8f91c1983ab09f90221fce2bee8496eb0009 100644 (file)
@@ -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
 
 #
index 22341b904d625f9d1ce78bc080bc21644e1bcf84..cab45dfe84b355813bde03886f5335fa17a472c4 100644 (file)
@@ -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
index f1f47c28372d0a3950924041232666bcaaba1e21..1f95e0df9bf23a73b353a9d9b12f13fad27be45f 100644 (file)
@@ -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.
index 8c20eea416df3717188b190cca502f33ab251a6e..4bc4a6ff5def059ee811dc71bad169a445070992 100644 (file)
@@ -728,6 +728,12 @@ RTE_INIT(rte_mlx4_pmd_init);
 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
index dc529c9cfdc62c8ad95cb69106e66726f9016799..4f11405a347c8a205c4b5b7c014938ed658ea77c 100644 (file)
@@ -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 */