From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 80B0D6C9F for ; Fri, 8 Jul 2016 15:29:05 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id z126so13303573wme.0 for ; Fri, 08 Jul 2016 06:29:05 -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:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=uqiQHox4DB4TR+j+RmZz+Jn3c5plRfjTe4au4AJG1OA=; b=GQK9ecEnxTFPSQK9bSW1h7GFqX+7emi8MopHWiaIL874YhLWhqypejqnEe4YnO+SxV lO4CmhFfW0rdtyebRPTRBAi5EvrSrmVn6vTUfmbBL1PgaNn6HuP+PlICHHAzo7msbf9/ 76eQ/HS+6Sywqz/Ua5eI5KkyfDHoCyrhiIHH6pUF4ocatSA2++EKCb7Ou/owjILjVGQ5 NY0kqZ+NSul2kEbTSd1BcI9vaqNzfd1vV+CCxCD3ZLDqwcfJhBiTG4nboGDadGftv8Zy nZL3KblK9WQnhsrSGAxgi6Lj8QXfTJVFk1+iAnoAM8bz9AaGFCZ7/ZQJfqGLsDAjnJpJ +bAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=uqiQHox4DB4TR+j+RmZz+Jn3c5plRfjTe4au4AJG1OA=; b=jz8jxY09Zgfvk6e3Ln7ap4QA/Hm0YaZq7R7pxmTdazkgrNpbqXwgN2MHa5ocNGFYHv IWzXhaSEN1x8OsjEszEy2EZrFP3XD9qQTwfDhBsi0rw/soQz2KoYcL6V/FzzW6kiS6e4 foN8ZmBum/TgmGC7Xixh1x0H/LC5mXlNxG/29/E7RCy/hmxIBfMrkEl5q9wwVrztcWYY i8aq7SOrPhiLqtAEOvesOLvrltoJs4NoEkmjnr4xctNW4Gf//if6XGsTIF8F18/CC6h8 vv/26wRhzoQaTA3mxwIMfO/uOlN50X7KwVyWcX2mqh1MIp4ZaUTuF5CUkh/PfB1BS6nS L3iw== X-Gm-Message-State: ALyK8tLTgYoi0lwYsb2njvX+xKev+eB9OwaViWrhAYdE3U0EYD5CV0bzkGoWfn2noN8NWAhe X-Received: by 10.28.166.150 with SMTP id p144mr3375994wme.57.1467984545085; Fri, 08 Jul 2016 06:29:05 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id a129sm3103124wma.2.2016.07.08.06.29.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jul 2016 06:29:04 -0700 (PDT) Date: Fri, 8 Jul 2016 15:29:02 +0200 From: Adrien Mazarguil To: Nelio Laranjeiro Cc: dev@dpdk.org, Olga Shern , Yongseok Koh Message-ID: <20160708132902.GF7621@6wind.com> Mail-Followup-To: Nelio Laranjeiro , dev@dpdk.org, Olga Shern , Yongseok Koh References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix a segmentation fault in Rx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2016 13:29:05 -0000 On Fri, Jul 08, 2016 at 02:43:26PM +0200, Nelio Laranjeiro wrote: > Fixed issue could occur when a Mbuf starvation happens in a middle of > reception of a segmented packet, in such situation, the PMD has to release > all segments of such packet. The end condition was wrong causing it to > free a Mbuf still handled by the NIC. > > Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support") > > Reported-by: Yongseok Koh > Signed-off-by: Nelio Laranjeiro > --- > drivers/net/mlx5/mlx5_rxtx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c > index 0c352f3..3564937 100644 > --- a/drivers/net/mlx5/mlx5_rxtx.c > +++ b/drivers/net/mlx5/mlx5_rxtx.c > @@ -1572,7 +1572,8 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) > rte_prefetch0(wqe); > rep = rte_mbuf_raw_alloc(rxq->mp); > if (unlikely(rep == NULL)) { > - while (pkt) { > + while (pkt != seg) { > + assert(pkt != (*rxq->elts)[idx]); > seg = NEXT(pkt); > rte_mbuf_refcnt_set(pkt, 0); > __rte_mbuf_raw_free(pkt); > -- > 2.1.4 > Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND