From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B2A1A3168 for ; Wed, 16 Oct 2019 17:03:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 00C9E1E969; Wed, 16 Oct 2019 17:03:00 +0200 (CEST) Received: from sysclose.org (smtp.sysclose.org [69.164.214.230]) by dpdk.org (Postfix) with ESMTP id A3B981E941 for ; Wed, 16 Oct 2019 17:02:58 +0200 (CEST) Received: by sysclose.org (Postfix, from userid 5001) id F0F74677B; Wed, 16 Oct 2019 15:03:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 sysclose.org F0F74677B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sysclose.org; s=201903; t=1571238205; bh=nWwN0QLIkIYRCDx7ab99BzCfSKEM0s6j2wExl6vdcl0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IHIDP8GpM8jP7Sk81xAkJIG3xvFPKq9lPIISYr8SR0pA9E1ilmNDo02DpklNBf4ga jPZwmbKjeqIV3ONkd1dMlLzWuE8Vlydw1A22wVdkLKScHVzf7hN/ZYbbgufpneVQSv 1ISOytP2+W5VbfTJ4nrckT3YCHbtUoB1940dVHxY3urm+IWT+m61vpzku9yI45zdp1 1LyZqJwT2A0UQddKIqv4fScUyweqiFnuldlwFDMLuN88IL0aDkF1Zi6NxS6AzeVxCr nkw7Y++j26wni2+Pt7TUfvs5jsu5t5Jds/ava52ezOzr08Q3GRM6TNTWnfHfML0RUs 6VFCU8C1pp2wQ== X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.sysclose.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from p50.lan (unknown [177.183.215.210]) by sysclose.org (Postfix) with ESMTPSA id 5FA7764FF; Wed, 16 Oct 2019 15:03:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 sysclose.org 5FA7764FF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sysclose.org; s=201903; t=1571238204; bh=nWwN0QLIkIYRCDx7ab99BzCfSKEM0s6j2wExl6vdcl0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OtpVbh6X8jjbJ4Ibrk2AYTQ9HVEBeWTLv5AbMirknDMS+ANbdNkWi8Gkbvv+2v6Fv jpmbsFY6fQTOY/XN3XzsCKxpZ1v1hiAZC1n9Y3IWyvAQZ80b31owLxxIr0/5plIniK TWiEkYv2A0vR2C6ATfU8SP7ggZgiaCDx62OIq4Ex/8XwD+8vxquPzpHxucNAnxOAAZ mrIXXjQvoU/00tXWsMJ1KtraDL6XlVv5zJat335Pnf6cPW7kZOGZ4vTsoHejWhT13H EM5b5gsFtAiq0hNUMZHhmZbR9RFC3+QZOFF/ZGq+PRx5V+hkB0nALz/NHeyX2glvs9 CUKwkvFZI3nXQ== Date: Wed, 16 Oct 2019 12:02:51 -0300 From: Flavio Leitner To: Ilya Maximets Cc: dev@dpdk.org, Maxime Coquelin , David Marchand , Tiwei Bie Message-ID: <20191016120251.0da2bb2c@p50.lan> In-Reply-To: <20191016143107.10424-1-i.maximets@ovn.org> References: <20191016143107.10424-1-i.maximets@ovn.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 16 Oct 2019 16:31:07 +0200 Ilya Maximets wrote: > mbuf allocation failure is a hard failure that highlights some > significant issues with memory pool size or a mbuf leak. > > We still have the message for subsequent chained mbufs, but not > for the first one. It was removed while introducing extbuf > support for large buffers. But it was useful for catching > mempool issues and needs to be returned back. > > Cc: Flavio Leitner > > Fixes: 5005bcda7123 ("vhost: add support for large buffers") > Signed-off-by: Ilya Maximets Reviewed-by: Flavio Leitner Thanks Ilya fbl > --- > lib/librte_vhost/virtio_net.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_vhost/virtio_net.c > b/lib/librte_vhost/virtio_net.c index 66f0c7206..f8af4e0b3 100644 > --- a/lib/librte_vhost/virtio_net.c > +++ b/lib/librte_vhost/virtio_net.c > @@ -1354,8 +1354,11 @@ virtio_dev_pktmbuf_alloc(struct virtio_net > *dev, struct rte_mempool *mp, { > struct rte_mbuf *pkt = rte_pktmbuf_alloc(mp); > > - if (unlikely(pkt == NULL)) > + if (unlikely(pkt == NULL)) { > + RTE_LOG(ERR, VHOST_DATA, > + "Failed to allocate memory for mbuf.\n"); > return NULL; > + } > > if (rte_pktmbuf_tailroom(pkt) >= data_len) > return pkt;