From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 90DEB8E65 for ; Fri, 8 Jul 2016 22:53:28 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 08 Jul 2016 13:53:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,332,1464678000"; d="scan'208";a="1013394692" Received: from ahaldar-mobl.ger.corp.intel.com ([10.252.24.62]) by orsmga002.jf.intel.com with SMTP; 08 Jul 2016 13:53:25 -0700 Received: by (sSMTP sendmail emulation); Fri, 08 Jul 2016 21:53:24 +0025 Date: Fri, 8 Jul 2016 21:53:24 +0100 From: Bruce Richardson To: Nelio Laranjeiro , dev@dpdk.org, Olga Shern , Yongseok Koh Message-ID: <20160708205324.GC34980@bricha3-MOBL3> References: <20160708132902.GF7621@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160708132902.GF7621@6wind.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) 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 20:53:29 -0000 On Fri, Jul 08, 2016 at 03:29:02PM +0200, Adrien Mazarguil wrote: > 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 > Applied to dpdk-next-net/rel_16_07 /Bruce