From: Adrien Mazarguil Date: Fri, 1 Sep 2017 08:06:23 +0000 (+0200) Subject: net/mlx4: remove scatter mode compilation option X-Git-Tag: spdx-start~2048 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=367b31cd5bd85ec4d84844bbaa1262455f2dc8ac;p=dpdk.git net/mlx4: remove scatter mode compilation option This option both sets the maximum number of segments for Rx/Tx packets and whether scattered mode is supported at all. This commit removes the latter as well as configuration file exposure since the most appropriate value should be decided at run-time. Signed-off-by: Adrien Mazarguil --- diff --git a/config/common_base b/config/common_base index 1f13652daf..4354970e38 100644 --- a/config/common_base +++ b/config/common_base @@ -215,7 +215,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_SGE_WR_N=4 CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE=0 CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8 diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst index eba81ba939..8c656d30f7 100644 --- a/doc/guides/nics/mlx4.rst +++ b/doc/guides/nics/mlx4.rst @@ -124,13 +124,6 @@ These options can be modified in the ``.config`` file. to abort with harmless debugging messages as a workaround. Relevant only when CONFIG_RTE_LIBRTE_MLX4_DEBUG is enabled. -- ``CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N`` (default **4**) - - Number of scatter/gather elements (SGEs) per work request (WR). Lowering - this number improves performance but also limits the ability to receive - scattered packets (packets that do not fit a single mbuf). The default - value is a safe tradeoff. - - ``CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE`` (default **0**) Amount of data to be inlined during TX operations. Improves latency but diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index 147e541e22..f9257fcbcc 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -68,10 +68,6 @@ else CFLAGS += -DNDEBUG -UPEDANTIC endif -ifdef CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N -CFLAGS += -DMLX4_PMD_SGE_WR_N=$(CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N) -endif - ifdef CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE CFLAGS += -DMLX4_PMD_MAX_INLINE=$(CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE) endif diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 2e8de92cb8..0bbcb7b433 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1176,8 +1176,6 @@ txq_mp2mr_iter(struct rte_mempool *mp, void *arg) txq_mp2mr(txq, mp); } -#if MLX4_PMD_SGE_WR_N > 1 - /** * Copy scattered mbuf contents to a single linear buffer. * @@ -1324,8 +1322,6 @@ stop: }; } -#endif /* MLX4_PMD_SGE_WR_N > 1 */ - /** * DPDK callback for TX. * @@ -1451,7 +1447,6 @@ mlx4_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) goto stop; sent_size += length; } else { -#if MLX4_PMD_SGE_WR_N > 1 struct ibv_sge sges[MLX4_PMD_SGE_WR_N]; struct tx_burst_sg_ret ret; @@ -1469,11 +1464,6 @@ mlx4_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) if (unlikely(err)) goto stop; sent_size += ret.length; -#else /* MLX4_PMD_SGE_WR_N > 1 */ - DEBUG("%p: TX scattered buffers support not" - " compiled in", (void *)txq); - goto stop; -#endif /* MLX4_PMD_SGE_WR_N > 1 */ } elts_head = elts_head_next; /* Increment sent bytes counter. */ diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index 97e042e06d..5c2005da84 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -81,9 +81,7 @@ #define MLX4_PMD_TX_PER_COMP_REQ 64 /* Maximum number of Scatter/Gather Elements per Work Request. */ -#ifndef MLX4_PMD_SGE_WR_N #define MLX4_PMD_SGE_WR_N 4 -#endif /* Maximum size for inline data. */ #ifndef MLX4_PMD_MAX_INLINE