From: Flavio Leitner <fbl@sysclose.org>
To: Ilya Maximets <i.maximets@ovn.org>
Cc: dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
David Marchand <david.marchand@redhat.com>,
Tiwei Bie <tiwei.bie@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure
Date: Wed, 16 Oct 2019 12:02:51 -0300 [thread overview]
Message-ID: <20191016120251.0da2bb2c@p50.lan> (raw)
In-Reply-To: <20191016143107.10424-1-i.maximets@ovn.org>
On Wed, 16 Oct 2019 16:31:07 +0200
Ilya Maximets <i.maximets@ovn.org> 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 <fbl@sysclose.org>
>
> Fixes: 5005bcda7123 ("vhost: add support for large buffers")
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Reviewed-by: Flavio Leitner <fbl@sysclose.org>
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;
next prev parent reply other threads:[~2019-10-16 15:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 14:31 Ilya Maximets
2019-10-16 15:02 ` Flavio Leitner [this message]
2019-10-17 4:43 ` Tiwei Bie
2019-10-24 9:39 ` Maxime Coquelin
2019-10-24 10:18 ` Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191016120251.0da2bb2c@p50.lan \
--to=fbl@sysclose.org \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=i.maximets@ovn.org \
--cc=maxime.coquelin@redhat.com \
--cc=tiwei.bie@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).