From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 5A8347D24 for ; Thu, 24 Aug 2017 15:29:07 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id i17so6945481wmb.0 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=gxJZHbCY10SDdgFhjBtKdWX28uezfPbrvtrD6bU4beRLGZrdWJrk8orWXpsBMvM43V DqZG4StXgf33CISXudWBgeA/G7vaqulshnLv/9iOMz6aktEDL0YccIav8yJxzatdS2bz EQK9HsEDAQbbnQIUtedGpOawxVRDOuhrvP6ycSajZoBoqgY6gSy4+iR94bCF9pUepLdD ftaGmyRcbff2NGTCI8oIwTnObUbmWus36hQT+3kbCBwJgLUxlKGwJzekOXUVi+kY0A5q k2ypFhPGbG0L7+VUc8MksC+AYOs4CwxGqANmpvvfFgJXsLoEaqlI5jdyNN7oNjXf6Pcj 1RkQ== X-Gm-Message-State: AHYfb5jedGhOBF8mcmxmkk+ZziZf+ZC0h8+wI9w/U9H/6I7z8d6Clz8Z v5Di+G/zHzVw0Gar 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-stable] [PATCH 2/2] net/mlx5: enforce Tx num of segments limitation 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: 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