From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by dpdk.org (Postfix) with ESMTP id 0D4E128C3 for ; Wed, 9 Aug 2017 21:27:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3317; q=dns/txt; s=iport; t=1502306875; x=1503516475; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=yH3QjWih8eNjcW3sOsZFbg2NI6sXLPXUZ6Kaf3JhR9s=; b=hKvg4yCWCLD/h86KreLl6NK5xXFCX3iCtSkYOriXKBaIrmoanHOXIje9 IBOuv5lPSa4NMHh7QpP4S9320eEQyPu/L9WREIcPbytR5Erap1mM4W/lJ dat7MmpEiTpcbebKIe+Cph99rScA1tGAvG+6TiO9DKw7rgM8hYumKVh4F c=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DNAABWYYtZ/5NdJa1cGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBg1pkgRQHjgiQBoFulhWCEiyFGwKEfj8YAQIBAQEBAQEBayiFGAEBAQE?= =?us-ascii?q?DJxM/DAQCAQgOAwMBAQEfBQQHMhQJCAIEAQ0FCIonELADOotmAQEBAQEBAQEBA?= =?us-ascii?q?QEBAQEBAQEBAQEBHYMoggKBTIUKgyaBGIYpBaAXAodRjFqCGFmFBIpllgoBHzi?= =?us-ascii?q?BCncVgyOCPRwZgU52AYdVgTKBDwEBAQ?= X-IronPort-AV: E=Sophos;i="5.41,349,1498521600"; d="scan'208";a="284297294" Received: from rcdn-core-11.cisco.com ([173.37.93.147]) by rcdn-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Aug 2017 19:27:53 +0000 Received: from XCH-RCD-006.cisco.com (xch-rcd-006.cisco.com [173.37.102.16]) by rcdn-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id v79JRrT8003168 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 9 Aug 2017 19:27:53 GMT Received: from xch-rcd-007.cisco.com (173.37.102.17) by XCH-RCD-006.cisco.com (173.37.102.16) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 9 Aug 2017 14:27:52 -0500 Received: from xch-rcd-007.cisco.com ([173.37.102.17]) by XCH-RCD-007.cisco.com ([173.37.102.17]) with mapi id 15.00.1210.000; Wed, 9 Aug 2017 14:27:52 -0500 From: "John Daley (johndale)" To: Yuanhan Liu , Aaron Conole CC: "Vincent S . Cojot" , dpdk stable Thread-Topic: patch 'net/enic: fix crash when freeing 0 packet to mempool' has been queued to LTS release 16.11.3 Thread-Index: AQHTEMJH0Ev3kC3u00W2r0XZsxceyqJ8aS2A Date: Wed, 9 Aug 2017 19:27:52 +0000 Message-ID: <7d3f812f89f7452eb5931370cbd791d0@XCH-RCD-007.cisco.com> References: <1502250240-6599-1-git-send-email-yliu@fridaylinux.org> <1502250240-6599-16-git-send-email-yliu@fridaylinux.org> In-Reply-To: <1502250240-6599-16-git-send-email-yliu@fridaylinux.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.19.145.148] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] patch 'net/enic: fix crash when freeing 0 packet to mempool' has been queued to LTS release 16.11.3 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: Wed, 09 Aug 2017 19:27:55 -0000 > -----Original Message----- > From: Yuanhan Liu [mailto:yliu@fridaylinux.org] > Sent: Tuesday, August 08, 2017 8:44 PM > To: Aaron Conole > Cc: Vincent S . Cojot ; John Daley (johndale) > ; dpdk stable ; Yuanhan Liu > > Subject: patch 'net/enic: fix crash when freeing 0 packet to mempool' has > been queued to LTS release 16.11.3 >=20 > Hi, >=20 > FYI, your patch has been queued to LTS release 16.11.3 >=20 > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > It will be pushed if I get no objections before 08/11/17. So please shout= if > anyone has objections. Certainly no objections from me. When are you targeting 16.11.3 release? Thanks, Johnd >=20 > Thanks. >=20 > --yliu >=20 > --- > From d471e9aabecec383a1e9187461ba88a70ce256cb Mon Sep 17 00:00:00 > 2001 > From: Aaron Conole > Date: Wed, 2 Aug 2017 14:02:13 -0400 > Subject: [PATCH] net/enic: fix crash when freeing 0 packet to mempool >=20 > [ upstream commit f7a58af502e08368a267886535367f205d4a5de6 ] >=20 > Occasionally, the amount of packets to free from the work queue ends > perfectly on a boundary to have nb_free =3D 0 and pool =3D 0. This cause= s a > segfault as follows: >=20 > (gdb) bt > #0 rte_mempool_default_cache > #1 rte_mempool_put_bulk (n=3D0, obj_table=3D0x7f10deff2530, mp=3D0x0) > #2 enic_free_wq_bufs (wq=3Dwq@entry=3D0x7efabffcd5b0, > completed_index=3Dcompleted_index@entry=3D33) > #3 0x00007f11e9c86e17 in enic_cleanup_wq (enic=3D, > wq=3Dwq@entry=3D0x7efabffcd5b0) > at /usr/src/debug/openvswitch-2.6.1/dpdk- > 16.11/drivers/net/enic/enic_rxtx.c:442 > #4 0x00007f11e9c86e5f in enic_xmit_pkts (tx_queue=3D0x7efabffcd5b0, > tx_pkts=3D0x7f10deffb1a8, nb_pkts=3D) > at /usr/src/debug/openvswitch-2.6.1/dpdk- > 16.11/drivers/net/enic/enic_rxtx.c:470 > #5 0x00007f11e9e147ad in rte_eth_tx_burst (nb_pkts=3D, > tx_pkts=3D0x7f10deffb1a8, queue_id=3D0, port_id=3D) >=20 > This commit makes the enic wq driver match other drivers who call the bul= k > free, by checking that there are actual packets to free. >=20 > Fixes: 36935afbc53c ("net/enic: refactor Tx mbuf recycling") >=20 > Reported-by: Vincent S. Cojot > Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=3D1468631 > Signed-off-by: Aaron Conole > Reviewed-by: John Daley > --- > drivers/net/enic/enic_rxtx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c = index > 912ea15..1934f8b 100644 > --- a/drivers/net/enic/enic_rxtx.c > +++ b/drivers/net/enic/enic_rxtx.c > @@ -426,7 +426,8 @@ static inline void enic_free_wq_bufs(struct vnic_wq > *wq, u16 completed_index) > tail_idx =3D enic_ring_incr(desc_count, tail_idx); > } >=20 > - rte_mempool_put_bulk(pool, (void **)free, nb_free); > + if (nb_free > 0) > + rte_mempool_put_bulk(pool, (void **)free, nb_free); >=20 > wq->tail_idx =3D tail_idx; > wq->ring.desc_avail +=3D nb_to_free; > -- > 2.7.4