From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wj0-f174.google.com (mail-wj0-f174.google.com [209.85.210.174]) by dpdk.org (Postfix) with ESMTP id 2DDA52C71 for ; Tue, 27 Dec 2016 11:21:36 +0100 (CET) Received: by mail-wj0-f174.google.com with SMTP id c11so110029838wjx.3 for ; Tue, 27 Dec 2016 02:21:36 -0800 (PST) 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:in-reply-to; bh=NbJMczf2GAKUCUmhy1HDjvPyRa2KmA5uZmPVSR6Aizw=; b=OUGLxso1uU0C4SyID9lWlSamKMoiVjKA51h0UgKIIizkqhbLaSTt4F72EIK//pCXyf pzqpu9SjI7v1VfzISGxAYVY6AN55/ltbK/hdEQ8/ZdsMYrbTzKchYyQHSR6dpE4y4nps 3/FWVpuzuQgEHNS10ENRAzfYIkN2xEBUn/3iLPF8DC+0vEYTGc/1KjiGSmqrl3Y2e2fn dr9VX6VhCuo0yqGEgq+oIzcJDDM4tfU+xbi8VwL/SyIYhglHnNDMfc+Ar1xcZal/t/uQ OFEDMEHZCp6V1OXUR9iI2dGHVBorDAnP/6dtbrT8tKC4EbnxudLYfkXLfzS61I5jeSu4 Iz6Q== 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:in-reply-to; bh=NbJMczf2GAKUCUmhy1HDjvPyRa2KmA5uZmPVSR6Aizw=; b=HzRyVVcsubZLjDsjw9a1B8tbUP+WuRbbgt9kyZxR+MFip2agvGfUfsyuDywf5aHN/9 xUwFhMjaXOhyOOwmJKVmvg1JutTpYkNeEU27VOKSIkVDHYGR1gz9KCRjGcniGKm/5nNN ed0sImtbzeSlqWzXMhXzCDsSJrxF2srlsm7AJIG/AuVaJDwqMbYH4ZUdoA5e8eXQCx48 nGH7jgh6a4fCDl5kCxnTkOgycE6KZ3JtK5arxjGRMT/FUTHJ3hte9g9Z7fFC+zJ9HW/w bzdfe5qTd543WbZg5rS541NLccM4MpRGWjc4OK4Xld7fJ5n6HQaI4ADXEJmfMYFSXf5S 5Njg== X-Gm-Message-State: AIkVDXLEBUn9soBL1vIUeyC4UQmzgJ3Nujzi6GJ+qwpSmzZHmc12xpaPHQpYVNuVi1sN4OgT X-Received: by 10.194.141.47 with SMTP id rl15mr3477514wjb.135.1482834095759; Tue, 27 Dec 2016 02:21:35 -0800 (PST) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id d184sm55707813wmd.8.2016.12.27.02.21.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 02:21:35 -0800 (PST) Date: Tue, 27 Dec 2016 11:21:27 +0100 From: Adrien Mazarguil To: Shahaf Shuler Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20161227102127.GG22106@6wind.com> References: <1482766116-6202-1-git-send-email-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1482766116-6202-1-git-send-email-shahafs@mellanox.com> Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix multi segment packet send 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: Tue, 27 Dec 2016 10:21:36 -0000 Hi Shahaf, On Mon, Dec 26, 2016 at 05:28:36PM +0200, Shahaf Shuler wrote: > Dseg pointer is not initialised when the first segment is inlined > causing a segmentation fault in such situation. > > Fixes: 2a66cf378954 ("net/mlx5: support inline send") > > CC: stable@dpdk.org > Signed-off-by: Shahaf Shuler Thanks for fixing this bug, a few comments below. > --- > drivers/net/mlx5/mlx5_rxtx.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c > index 97810e8..d6688c6 100644 > --- a/drivers/net/mlx5/mlx5_rxtx.c > +++ b/drivers/net/mlx5/mlx5_rxtx.c > @@ -483,7 +483,7 @@ > assert(addr <= addr_end); > } > /* > - * 2 DWORDs consumed by the WQE header + 1 DSEG + > + * 2 DWORDs consumed by the WQE header + ETH segment + > * the size of the inline part of the packet. > */ > ds = 2 + MLX5_WQE_DS(pkt_inline_sz - 2); > @@ -498,6 +498,10 @@ > } else if (!segs_n) { > goto next_pkt; > } else { > + /* dseg will be advance as part of next_seg*/ Nit-picking here, there is a missing space in the above comment. > + dseg = (volatile rte_v128u32_t *) rte_v128u32_t does not exist (yet) in the tree, this patch therefore depends on "eal: define generic vector types" [1]. Such dependencies should be mentioned as a notes section of a patch (after a three-dash line). Regarding stable@dpdk.org, un case the vector types patch is not applied on the stable branch, you'll also have to provide your own definition. > + ((uintptr_t)wqe + > + ((ds - 1) * MLX5_WQE_DWORD_SIZE)); > goto next_seg; > } > } else { > -- > 1.8.3.1 > Otherwise, Acked-by: Adrien Mazarguil [1] http://dpdk.org/ml/archives/dev/2016-November/050261.html -- Adrien Mazarguil 6WIND