From: "Michael S. Tsirkin" <mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Linhaifeng <haifeng.lin-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: "dpd >> dev-VfR2kkLFssw@public.gmane.org"
<dev-VfR2kkLFssw@public.gmane.org>,
liuyongan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Subject: Re: vhost: virtio-net rx-ring stop work after work many hours, bug?
Date: Tue, 27 Jan 2015 11:37:15 +0200 [thread overview]
Message-ID: <20150127093715.GB23066@redhat.com> (raw)
In-Reply-To: <54C744D9.3060900-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
On Tue, Jan 27, 2015 at 03:57:13PM +0800, Linhaifeng wrote:
> Hi,all
>
> I use vhost-user to send data to VM at first it cant work well but after many hours VM can not receive data but can send data.
>
> (gdb)p avail_idx
> $4 = 2668
> (gdb)p free_entries
> $5 = 0
> (gdb)l
> /* check that we have enough buffers */
> if (unlikely(count > free_entries))
> count = free_entries;
>
> if (count == 0){
> int b=0;
> if(b) { // when set b=1 to notify guest rx_ring will restart to work
> if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) {
>
> eventfd_write(vq->callfd, 1);
> }
> }
> return 0;
> }
>
> some info i print in guest:
>
> net eth3:vi->num=199
> net eth3:rvq info: num_free=57, used->idx=2668, avail->idx=2668
> net eth3:svq info: num_free=254, used->idx=1644, avail->idx=1644
>
> net eth3:vi->num=199
> net eth3:rvq info: num_free=57, used->idx=2668, avail->idx=2668
> net eth3:svq info: num_free=254, used->idx=1645, avail->idx=1645
>
> net eth3:vi->num=199
> net eth3:rvq info: num_free=57, used->idx=2668, avail->idx=2668
> net eth3:svq info: num_free=254, used->idx=1646, avail->idx=1646
>
> # free
> total used free shared buffers cached
> Mem: 3924100 337252 3586848 0 95984 138060
> -/+ buffers/cache: 103208 3820892
> Swap: 970748 0 970748
>
> I have two questions:
> 1.Should we need to notify guest when there is no buffer in vq->avail?
No unless NOTIFY_ON_EMPTY is set (most guests don't set it).
> 2.Why virtio_net stop to fill avail?
Most likely, it didn't get an interrupt.
If so, it would be a dpdk vhost user bug.
Which code are you using in dpdk?
>
>
>
>
>
> --
> Regards,
> Haifeng
next prev parent reply other threads:[~2015-01-27 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 7:57 vhost: virtio-net rx-ring stop work after work many hours, bug? Linhaifeng
[not found] ` <54C744D9.3060900-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-01-27 9:37 ` Michael S. Tsirkin [this message]
[not found] ` <20150127093715.GB23066-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-02-03 12:38 ` Linhaifeng
2015-01-28 9:51 ` Xie, Huawei
[not found] ` <C37D651A908B024F974696C65296B57B0F36EF67-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-03 12:48 ` Linhaifeng
2015-02-03 7:35 ` Linhaifeng
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=20150127093715.GB23066@redhat.com \
--to=mst-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
--cc=haifeng.lin-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=liuyongan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.