From: Francesco Valla <francesco@valla.it>
To: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Vincent Mailhol <mailhol@kernel.org>,
Harald Mommer <harald.mommer@oss.qualcomm.com>,
Mikhail Golubev-Ciuchea
<mikhail.golubev-ciuchea@oss.qualcomm.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
linux-can@vger.kernel.org, virtualization@lists.linux.dev,
Wolfgang Grandegger <wg@grandegger.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Stefano Garzarella <sgarzare@redhat.com>
Subject: Re: [PATCH v6] can: virtio: Add virtio CAN driver
Date: Wed, 7 Jan 2026 19:55:26 +0100 [thread overview]
Message-ID: <aV6sHofXnZuu84OV@bywater> (raw)
In-Reply-To: <CAHYGQ0yHSvhOibhvxtFjZ7H3Tczb22JZ1UuaX5kkOtok0JjDgQ@mail.gmail.com>
Hi Matias,
On Wed, Jan 07, 2026 at 05:14:25PM +0100, Matias Ezequiel Vara Larsen wrote:
> On Fri, Dec 26, 2025 at 4:09 PM Francesco Valla <francesco@valla.it> wrote:
> >
> > Hi,
> >
> > On Sun, Dec 14, 2025 at 04:25:54PM +0100, Francesco Valla wrote:
> > > While stress testing this, I noticed that flooding the virtio-can
> > > interface with packets leads to an hang of the interface itself.
> > > I am seeing this issuing, at host side:
> > >
> > > while true; do cansend can0 123#00; done
> > >
> > > with:
> > >
> > > - QEMU: the tip of the master branch plus [2]
> > > - vhost-device: the tip of the main branch
> > >
> > > and the following QEMU invocation:
> > >
> > > qemu-system-x86_64 -serial mon:stdio \
> > > -m 2G -smp 2 \
> > > -kernel $(pwd)/BUILD.bin/arch/x86/boot/bzImage \
> > > -initrd /home/francesco/SRC/LINUX_KERNEL/initramfs.gz \
> > > -append "loglevel=7 console=ttyS0" \
> > > -machine memory-backend=pc.ram \
> > > -object memory-backend-file,id=pc.ram,size=2G,mem-path=/tmp/pc.ram,share=on \
> > > -chardev socket,id=can0,path=/tmp/sock-can0 \
> > > -device vhost-user-can-pci,chardev=can0
> > >
> > >
> > > Restarting the interface (i.e.: ip link set down and the up) does not
> > > fix the situation.
> > >
> > > I'll try to do some more testing during the next days.
> >
> > After a deep dive, I _think_ the problem actually lies in vhost-device,
> > since it is not there (or al least, it seems so) using an alternative
> > implementation that uses the qemu socketcan support [0] (implementation
> > which builds on top of the work done by Harald and Mikhail):
> >
> > qemu-system-x86_64 -serial mon:stdio \
> > -m 2G -smp 2 -enable-kvm \
> > -kernel $(pwd)/BUILD.bin/arch/x86/boot/bzImage \
> > -initrd /home/francesco/SRC/LINUX_KERNEL/initramfs.gz \
> > -append "loglevel=7 console=ttyS0" \
> > -object can-bus,id=canbus0 -object can-host-socketcan,id=canhost0,if=vcan0,canbus=canbus0 \
> > -device virtio-can-pci,canbus=canbus0
> >
> > Unfortunately, my Rust knoweledge is not sufficient to understand the
> > vhost-device implementation [1]; the issue seems to be related to the
> > host->guest vring becoming empty and not refilling anymore.
> >
>
> Can you try with
> https://github.com/MatiasVara/vhost-device/commits/fix-for-923/?
I'll stress test it during the night, but this seems to fix it. Before
it was reproducible in a consistent manner after mere seconds, while i
now in a bunch of runs I never reproduced it.
I also agree with your analysis on the commit.
>
> Thanks, Matias
>
>
Thank you!
Francesco
next prev parent reply other threads:[~2026-01-07 18:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 17:40 [PATCH v6] can: virtio: Add virtio CAN driver Matias Ezequiel Vara Larsen
2025-11-03 21:37 ` Francesco Valla
2025-12-11 17:52 ` Matias Ezequiel Vara Larsen
2025-12-14 15:25 ` Francesco Valla
2025-12-18 19:51 ` Harald Mommer
2025-12-18 23:07 ` Francesco Valla
2026-01-06 17:20 ` Harald Mommer
2025-12-21 13:01 ` Michael S. Tsirkin
2025-12-26 19:45 ` Matias Ezequiel Vara Larsen
2025-12-26 15:08 ` Francesco Valla
2026-01-07 16:14 ` Matias Ezequiel Vara Larsen
2026-01-07 18:55 ` Francesco Valla [this message]
2026-01-07 23:00 ` Francesco Valla
2026-01-07 23:21 ` Matias Ezequiel Vara Larsen
2026-01-08 20:21 ` Matias Ezequiel Vara Larsen
2026-01-09 16:58 ` Francesco Valla
2025-12-26 20:52 ` Matias Ezequiel Vara Larsen
2025-12-26 22:22 ` Francesco Valla
2025-12-29 15:47 ` Matias Ezequiel Vara Larsen
2025-12-29 18:53 ` Matias Ezequiel Vara Larsen
2025-12-29 20:55 ` Francesco Valla
2025-12-31 21:08 ` Matias Ezequiel Vara Larsen
2026-01-06 18:17 ` Matias Ezequiel Vara Larsen
2026-01-06 16:50 ` Harald Mommer
2026-01-06 19:43 ` Oliver Hartkopp
2026-01-06 20:39 ` Francesco Valla
2026-01-07 15:42 ` Oliver Hartkopp
2026-01-07 16:01 ` Matias Ezequiel Vara Larsen
2025-12-12 15:35 ` Matias Ezequiel Vara Larsen
2025-12-14 7:20 ` Michael S. Tsirkin
2025-12-14 14:24 ` Francesco Valla
2025-11-17 9:49 ` Michael S. Tsirkin
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=aV6sHofXnZuu84OV@bywater \
--to=francesco@valla.it \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=harald.mommer@oss.qualcomm.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mikhail.golubev-ciuchea@oss.qualcomm.com \
--cc=mkl@pengutronix.de \
--cc=mst@redhat.com \
--cc=mvaralar@redhat.com \
--cc=pabeni@redhat.com \
--cc=sgarzare@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=wg@grandegger.com \
--cc=xuanzhuo@linux.alibaba.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