* [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure
@ 2019-10-16 14:31 Ilya Maximets
2019-10-16 15:02 ` Flavio Leitner
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ilya Maximets @ 2019-10-16 14:31 UTC (permalink / raw)
To: dev, Maxime Coquelin
Cc: Flavio Leitner, David Marchand, Tiwei Bie, Ilya Maximets
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>
---
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;
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure
2019-10-16 14:31 [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure Ilya Maximets
@ 2019-10-16 15:02 ` Flavio Leitner
2019-10-17 4:43 ` Tiwei Bie
2019-10-24 9:39 ` Maxime Coquelin
2 siblings, 0 replies; 5+ messages in thread
From: Flavio Leitner @ 2019-10-16 15:02 UTC (permalink / raw)
To: Ilya Maximets; +Cc: dev, Maxime Coquelin, David Marchand, Tiwei Bie
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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure
2019-10-16 14:31 [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure Ilya Maximets
2019-10-16 15:02 ` Flavio Leitner
@ 2019-10-17 4:43 ` Tiwei Bie
2019-10-24 9:39 ` Maxime Coquelin
2 siblings, 0 replies; 5+ messages in thread
From: Tiwei Bie @ 2019-10-17 4:43 UTC (permalink / raw)
To: Ilya Maximets; +Cc: dev, Maxime Coquelin, Flavio Leitner, David Marchand
On Wed, Oct 16, 2019 at 04:31:07PM +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 <fbl@sysclose.org>
>
> Fixes: 5005bcda7123 ("vhost: add support for large buffers")
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> ---
> lib/librte_vhost/virtio_net.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Thanks,
Tiwei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure
2019-10-16 14:31 [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure Ilya Maximets
2019-10-16 15:02 ` Flavio Leitner
2019-10-17 4:43 ` Tiwei Bie
@ 2019-10-24 9:39 ` Maxime Coquelin
2019-10-24 10:18 ` Maxime Coquelin
2 siblings, 1 reply; 5+ messages in thread
From: Maxime Coquelin @ 2019-10-24 9:39 UTC (permalink / raw)
To: Ilya Maximets, dev; +Cc: Flavio Leitner, David Marchand, Tiwei Bie
On 10/16/19 4:31 PM, 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 <fbl@sysclose.org>
>
> Fixes: 5005bcda7123 ("vhost: add support for large buffers")
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> ---
> lib/librte_vhost/virtio_net.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure
2019-10-24 9:39 ` Maxime Coquelin
@ 2019-10-24 10:18 ` Maxime Coquelin
0 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2019-10-24 10:18 UTC (permalink / raw)
To: Ilya Maximets, dev; +Cc: Flavio Leitner, David Marchand, Tiwei Bie
On 10/24/19 11:39 AM, Maxime Coquelin wrote:
>
>
> On 10/16/19 4:31 PM, 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 <fbl@sysclose.org>
>>
>> Fixes: 5005bcda7123 ("vhost: add support for large buffers")
>> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
>> ---
>> lib/librte_vhost/virtio_net.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>
> Thanks!
> Maxime
>
Applied to dpdk-next-virtio/master.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-24 10:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 14:31 [dpdk-dev] [PATCH] vhost: return error message for mbuf allocation failure Ilya Maximets
2019-10-16 15:02 ` Flavio Leitner
2019-10-17 4:43 ` Tiwei Bie
2019-10-24 9:39 ` Maxime Coquelin
2019-10-24 10:18 ` Maxime Coquelin
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).