From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 55E897D14 for ; Thu, 24 Aug 2017 15:29:07 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id a70so6926392wmd.1 for ; Thu, 24 Aug 2017 06:29:07 -0700 (PDT) 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:content-transfer-encoding:in-reply-to :user-agent; bh=R1us+TA6TB5vnDYy+J0s3IAakpFKivjuBp16SaRrfGA=; b=mk6Ql3HyfID3Bmyua9pz1vNU3fXfWz072f17N1d2WbiUx2HcWvuYknyL6i1meet0UU 4CQ3Dj0dh2ZCTRcIiaIyG3QVceAqnDNglvsrx0sYttujYgVglfUFB/C5WEaooV7T/R6j tFE09YC/vtaSe9g0J45kQGFXp1NEsbG5RmPz1VrnTLKOoAnCexqFxFa8A1CCuN9ihlFN i+BdosSHbN6eMTs1IcntFY11lGMPdnJrFZT9ccr273N+QGXrdNUq+gZw5K29hCCWvW7h ZJO3a0KtgsSEXqcfoEtB3s9BgjsJOJErn8pucCWGhXs403yLSVKF/PUXqYx8gQRm5tbS 7oag== 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:content-transfer-encoding :in-reply-to:user-agent; bh=R1us+TA6TB5vnDYy+J0s3IAakpFKivjuBp16SaRrfGA=; b=PscyZhSYoH+KhRusYkIckyPgtu8wlXL49iJMaEH4SWfEPWKp8cFy1VE3+oovZpaB50 evaV8VnXPm53ivCmv4Cg3M8mweeVqyA88fKmfA790rnbz5L66UYgtvhjBpmt7qg9tvmP rRlgTXEtnRYWm6hOVByue+ucS3emt4oQfpP9EFrcaQasE30syrRmkx9VLwjTQO+3KgnW UwZKDitfTnb/cc9XkWKwh3nYq8cpcKkUFJNe+BFFH25/QIF7mVayjWBUhG335nDHa+qD /ZqkpmlU5qjKxQOO+xXZnO0KDZ8T0wwarGHgyrsmoUHzHaZoDUMVP8eH0dwmv45/bhX3 7TtQ== X-Gm-Message-State: AHYfb5iWDG4TSnVyh9D4ObYlc4+6t+xyb5A/JxopYQR1zP4wh6LexQaD jMba4NywOXSeWYYhKlS1bQ== X-Received: by 10.28.22.69 with SMTP id 66mr1079874wmw.165.1503581346699; Thu, 24 Aug 2017 06:29:06 -0700 (PDT) Received: from autoinstall.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 123sm4956327wmt.14.2017.08.24.06.29.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 06:29:06 -0700 (PDT) Date: Thu, 24 Aug 2017 15:28:57 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Shahaf Shuler Cc: adrien.mazarguil@6wind.com, dev@dpdk.org, yskoh@mellanox.com, stable@dpdk.org Message-ID: <20170824132857.GK4544@autoinstall.dev.6wind.com> References: <20170823073358.116786-1-shahafs@mellanox.com> <20170823073358.116786-2-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170823073358.116786-2-shahafs@mellanox.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 2/2] net/mlx5: enforce Tx num of segments limitation 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: Thu, 24 Aug 2017 13:29:07 -0000 On Wed, Aug 23, 2017 at 10:33:58AM +0300, Shahaf Shuler wrote: > Mellanox NICs has a limitation on the number of mbuf segments a multi > segment mbuf can have. The max number depends on the Tx offloads requested. > > The current code not enforce such limitation, which might cause > malformed WQEs to be written to the device. Avoid acronyms in the commit message (at least on first occurrence), not all people knows what a WQE is and getting such information is not easy. > This commit adds verification for the number of mbuf segments posted > to the device. In case of overflow the packet will not be sent. > Debug prints were added to help application identify the cause for such > case. > > Cc: stable@dpdk.org > > Signed-off-by: Shahaf Shuler > --- > > This patch should be applied only after the series: > http://dpdk.org/dev/patchwork/patch/27367/ > > --- > drivers/net/mlx5/mlx5_defs.h | 3 ++- > drivers/net/mlx5/mlx5_prm.h | 3 +++ > drivers/net/mlx5/mlx5_rxtx.c | 30 +++++++++++++++++++++++++++--- > drivers/net/mlx5/mlx5_rxtx_vec_sse.c | 8 ++++++++ > drivers/net/mlx5/mlx5_txq.c | 27 +++++++++++++++++++++++++++ > 5 files changed, 67 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h > index 608072f7e..87244e7db 100644 > --- a/drivers/net/mlx5/mlx5_prm.h > +++ b/drivers/net/mlx5/mlx5_prm.h > @@ -154,6 +154,9 @@ > /* Default mark value used when none is provided. */ > #define MLX5_FLOW_MARK_DEFAULT 0xffffff > > +/* Maximum number of DS in WQE. */ > +#define MLX5_MAX_DS (63) > + Why the parenthesis? Thanks, -- Nélio Laranjeiro 6WIND