DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Tummala, Sivaprasad" <sivaprasad.tummala@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	Flavio Leitner <fbl@sysclose.org>
Cc: "Wang, Zhihong" <zhihong.wang@intel.com>,
	"Ye, Xiaolong" <xiaolong.ye@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] vhost: fix mbuf alloc failure
Date: Tue, 5 May 2020 11:56:12 +0000	[thread overview]
Message-ID: <FDDE0085FF3F264C97717D963DBD9EA229F3FD9F@PGSMSX112.gar.corp.intel.com> (raw)
In-Reply-To: <cb6a1e09-e6fb-f2e4-8d9b-3b22c60ea398@redhat.com>

Hi Maxime, 

Thanks for your comments. 

SNIPPED

if (allocerr_warned) {
> 
>     VHOST_LOG_DATA(ERR,
> 
>     "Failed to allocate memory for mbuf. Packet dropped!\n");
> 
>     allocerr_warned = true;
> 
> }
> 
>  
> 
> This is good idea, but having a static variable makes it file scope 
> making it to  entire VHOST devices. Hence if the intention is to 
> implement device specific
> 
> log rate limit, should not we resort to `dev->allocerr_warn` counter 
> mechanism, which resets after n failures `#define LOG_ALLOCFAIL 32`.

I prefer Flavio's proposal, it would have less performance impact than increasing struct virtio_net size. As soon as we can see the error popping once in the log message, it gives some clues on what to investigate. Maybe providing more details on the failure could help, like printing the pool name and the requested length.

Agreed. Change in the next patch, sample format as `VHOST_DATA : Failed mbuf alloc of size 2054 from mbuf_pool_socket_0 on /tmp/vhost1.`

SNIPPED

  reply	other threads:[~2020-05-05 11:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28  9:52 [dpdk-dev] [PATCH v1] vhost: fix mbuf allocation failures Sivaprasad Tummala
2020-04-29  8:43 ` Maxime Coquelin
2020-04-29 17:35   ` Flavio Leitner
2020-04-30  7:13     ` Tummala, Sivaprasad
2020-05-04 17:11 ` [dpdk-dev] [PATCH v2] vhost: fix mbuf alloc failure Sivaprasad Tummala
2020-05-04 19:32   ` Flavio Leitner
2020-05-05  5:48     ` Tummala, Sivaprasad
2020-05-05  8:20       ` Maxime Coquelin
2020-05-05 11:56         ` Tummala, Sivaprasad [this message]
2020-05-08 11:17   ` [dpdk-dev] [PATCH v3] vhost: fix mbuf allocation failures Sivaprasad Tummala
2020-05-15  7:29     ` Maxime Coquelin
2020-05-15  8:36     ` 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=FDDE0085FF3F264C97717D963DBD9EA229F3FD9F@PGSMSX112.gar.corp.intel.com \
    --to=sivaprasad.tummala@intel.com \
    --cc=dev@dpdk.org \
    --cc=fbl@sysclose.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=xiaolong.ye@intel.com \
    --cc=zhihong.wang@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).