[virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

Parav Pandit
Wed, 10 Aug 2022 16:00:08 -0000

> From: Michael S. Tsirkin <mst at redhat.com>
> Sent: Wednesday, August 10, 2022 5:03 AM
> > >
> > > Should we make this depend on the vq reset ability maybe?
> >
> > The advantage of this is to keep TX working. Or we can use device
> > reset as a fallback if there's no vq reset.
> >
> > Thanks
>
> Device reset is really annoying in that it loses all the state:
> rx filters etc etc.

The elegant solution is let driver tell the new mtu to the device.
One way to do so is by using existing ctrl vq.
If merged buffer is done, and new mtu is > minimum posting size, no need to
undergo vq reset.
If merged buffer is not done, and buffer posted are smaller than new mtu,
undergo vq reset optionally.