linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Mon, 29 Dec 2025 21:55:50 +0100	[thread overview]
Message-ID: <aVLq1ibPcPHk-7Qv@bywater> (raw)
In-Reply-To: <aVLOPMmpvArnVAHZ@fedora>

Hi Matias,

On Mon, Dec 29, 2025 at 07:53:48PM +0100, Matias Ezequiel Vara Larsen 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.
> 
> I tried this and I could not reproduce it. [2] requires a minimal change
> to apply, i.e., qdev-properties.h has changed to /core. I'll send a v2
> for that. I used latest vhost-device-can. I run `candump can0` in the
> guest and `while true; do cangen vcan0; done` in the host. Am I missing
> something?

With the plain 'cangen' you are not really flooding the interface, since
you are only sending a random CAN frame every 200ms. The only way I can
reproduce this behaviour in a consistent manner is running from the host:

    while true; do cansend vcan0 134#00; done

which seems to generate the maximum amount of traffic.

This is not of course a realistic bus load, but is leading the system
(at least on my setup) to a corner case somewhere.

> 
> Thanks,
> 
> Matias
> 
> 

Thank you for this effort!

Regards,
Francesco


  reply	other threads:[~2025-12-29 21:48 UTC|newest]

Thread overview: 18+ 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
2025-12-21 13:01         ` Michael S. Tsirkin
2025-12-26 19:45         ` Matias Ezequiel Vara Larsen
2025-12-26 15:08       ` 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 [this message]
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=aVLq1ibPcPHk-7Qv@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;
as well as URLs for NNTP newsgroup(s).