From patchwork Tue Aug 1 16:53:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Mazarguil X-Patchwork-Id: 27320 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 28F3AA0E8; Tue, 1 Aug 2017 18:55:16 +0200 (CEST) Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id 806E29B93 for ; Tue, 1 Aug 2017 18:55:01 +0200 (CEST) Received: by mail-wr0-f175.google.com with SMTP id y43so9239459wrd.3 for ; Tue, 01 Aug 2017 09:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=EY//4/Tz4vtm977XjSRHVmFqIE0YarkwDiOpW1AHQ50=; b=oANRBZhiIiFnyXImgeqXYbOnG9uEOgDoN4sWzN2yYYWJbiVOsZcfb+12AkhKKfP4Z2 s9RV1U7fNJlSoud+DYQPqL1u1gVM5V26FuJJRjmO6I4nT2YK+3tAJqebOcS87oD/LFhi NtDOancDswOY9BRUSDG+IRdugSGq/Cgg7FhVzJ4M9iqrZNoD7amMYlab6HQHZBrVTOCc VOYnp7rueohFs2vhm2GuJkZrciY9QelIDOJ9ErDC68aBNkkXdvNLf3AH0tViRK7hz7EN ee58sPxNC/esYVQB0IXVO58PhFHzqRHTTSBi4gnn1B2zU5wKYPXR8hOKFbfZpkfJfdBm U50w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=EY//4/Tz4vtm977XjSRHVmFqIE0YarkwDiOpW1AHQ50=; b=GmuwAAXMi8YQsOivx2tyEn8ZozXEtLfMwub6noakpN+ywgVZJkmrioORK9ShK4UURw QhX5QUvH5Hsx0jy4n7kW7/fk1K4wlurdcj2aFUsrAfb6X+Tj/hurJ9p1Zn+hwsBoY5r0 GBMiNFs/3aFJBMcF2YsMb7mWAc8G0Ri+z9aaEY2kJ+QjpDbtbbgHVf1w6zF0JCRZia/z ZwgLZRtjKMYIGDw3FJndVMAk8NCyyp7f5QbTHlYMUOe4wyUWoADvYtRcBEakjMNLI+ZE 8PZnD6tP/vbg7fmbOXeLdHzvr7i8U7BwSyCbBTgpuoYuLPQ4mInkZebyF61JbCOXCnsI JnHQ== X-Gm-Message-State: AIVw111tORZ1LPWoGDQOj4CxHZF12rl4oyMDb7YXLCUZUBUxUCV8x0Yk I4WNwYDduLlqp2OsjxE= X-Received: by 10.223.163.158 with SMTP id l30mr17993245wrb.203.1501606500971; Tue, 01 Aug 2017 09:55:00 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id g16sm1709058wmd.37.2017.08.01.09.55.00 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 01 Aug 2017 09:55:00 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Date: Tue, 1 Aug 2017 18:53:55 +0200 Message-Id: <89665771656b9d868d0c8cafdae87dce27b4105a.1501598384.git.adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v1 08/48] net/mlx4: remove scatter mode compilation option 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- config/common_base | 1 - doc/guides/nics/mlx4.rst | 7 ------- drivers/net/mlx4/Makefile | 4 ---- drivers/net/mlx4/mlx4.c | 10 ---------- drivers/net/mlx4/mlx4.h | 2 -- 5 files changed, 24 deletions(-) diff --git a/config/common_base b/config/common_base index d768804..2520bd1 100644 --- a/config/common_base +++ b/config/common_base @@ -213,7 +213,6 @@ CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y # CONFIG_RTE_LIBRTE_MLX4_PMD=n CONFIG_RTE_LIBRTE_MLX4_DEBUG=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 729e6c1..f84d56c 100644 --- a/doc/guides/nics/mlx4.rst +++ b/doc/guides/nics/mlx4.rst @@ -116,13 +116,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_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 2db9b10..a9c44ca 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 34ef80f..6dd0863 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 @@ tx_burst_sg(struct txq *txq, unsigned int segs, struct txq_elt *elt, }; } -#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 b88d8b0..785b2ac 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