From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 657BB2C16; Thu, 3 Aug 2017 22:58:34 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1888320B82; Thu, 3 Aug 2017 16:58:34 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 03 Aug 2017 16:58:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=fLTqxJdfPk/xwVB ayXL9OepXZuS2i89Sougi7Cvb5KE=; b=BgJkBheTvckIyftfL4L2F03h4lmnKHL vKMsTUlKz1lVXv8yZBE8GF73gkjzy4MOg2G/MvVkvzCdoAegY42iiV2n0dCpj2dc m8z2R/BPAHODcXAk5aIZ53yPGOJv/Gyvw/k4/pVKVZhD1t5k+SuXuH1XqXcmBnKb S5LF/5tGeg1A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=fLTqxJdfPk/xwVBayXL9OepXZuS2i89Sougi7Cvb5KE=; b=dEfRdJg7 ZL87jmcO9wZrZdgaLi+B1y1S66cnqwd9iswr+5xxs91jQcGOb/bWNPsJIRnU7ulZ 6yrp+cNSdEE85p487U2tyoEDWnJaLM86W1jvkpnuowHJjYvqcbKC6skgSb6GAEys aNBZGCm4kP9EsIIbZCDRVMyQnlEI6QvCnBdSCDFlfHsrd2k3AV6nsfRfoalvvPaD dVNqwmhl3rz8MFSiLXGb/VhBnLCF9k9urCS7mgP9jwCkOxxb5HwtfLNLa3EmJj2h FQ5GcgfwrrtL6hMRs0qiAWfuzs8hOreekX7YJTLL/OxuOsrf+4I7pQq464FEgriu F0bWSi89iPncOQ== X-ME-Sender: X-Sasl-enc: weuto8tVWYXJbawBU+UEgSbZ2kmqOiZw0b700UzAh8yF 1501793913 Received: from xps.localnet (196.114.118.80.rev.sfr.net [80.118.114.196]) by mail.messagingengine.com (Postfix) with ESMTPA id 98F1E7E4A9; Thu, 3 Aug 2017 16:58:33 -0400 (EDT) From: Thomas Monjalon To: Aaron Conole Cc: stable@dpdk.org, "John Daley (johndale)" , dev@dpdk.org, Bruce Richardson Date: Thu, 03 Aug 2017 22:58:31 +0200 Message-ID: <7771250.dkQc2fQUgz@xps> In-Reply-To: <1a29ffbed0e442798d0e29b5af90f1fc@XCH-RCD-007.cisco.com> References: <20170802180213.28736-1-aconole@redhat.com> <1a29ffbed0e442798d0e29b5af90f1fc@XCH-RCD-007.cisco.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH] enic: check for nb_free > 0 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, 03 Aug 2017 20:58:34 -0000 > > Occasionally, the amount of packets to free from the work queue ends > > perfectly on a boundary to have nb_free = 0 and pool = 0. This causes a > > segfault as follows: > > > > (gdb) bt > > #0 rte_mempool_default_cache (mp=, mp= > out>, > > lcore_id=) > > at /usr/src/debug/openvswitch-2.6.1/dpdk-16.11/x86_64-native- > > linuxapp-gcc/include/rte_mempool.h:1017 > > #1 rte_mempool_put_bulk (n=0, obj_table=0x7f10deff2530, mp=0x0) > > at /usr/src/debug/openvswitch-2.6.1/dpdk-16.11/x86_64-native- > > linuxapp-gcc/include/rte_mempool.h:1174 > > #2 enic_free_wq_bufs (wq=wq@entry=0x7efabffcd5b0, > > completed_index=completed_index@entry=33) > > at /usr/src/debug/openvswitch-2.6.1/dpdk- > > 16.11/drivers/net/enic/enic_rxtx.c:429 > > #3 0x00007f11e9c86e17 in enic_cleanup_wq (enic=, > > wq=wq@entry=0x7efabffcd5b0) > > 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=0x7efabffcd5b0, > > tx_pkts=0x7f10deffb1a8, nb_pkts=) > > 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=, > > tx_pkts=0x7f10deffb1a8, queue_id=0, port_id=) > > > > This commit makes the enic wq driver match other drivers who call the bulk > > free, by checking that there are actual packets to free. > > > > Fixes: 36935afbc53c ("net/enic: refactor Tx mbuf recycling") > > CC: stable@dpdk.org > > Reported-by: Vincent S. Cojot > > Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1468631 > > Signed-off-by: Aaron Conole > > Reviewed-by: John Daley Applied, thanks With more context in the title: net/enic: fix crash when freeing 0 packet to mempool