Re: [PATCH v2] virtio-net: Fix probe of virtio-net on kvmtool

From: Rob Bradford
Date: Wed Mar 01 2023 - 09:25:27 EST


On Tue, 28 Feb 2023 at 10:08, Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, 24 Feb 2023 11:11:37 +0800, Jason Wang <jasowang@xxxxxxxxxx> wrote:
> > On Fri, Feb 24, 2023 at 3:38 AM Rob Bradford via B4 Relay
> > <devnull+rbradford.rivosinc.com@xxxxxxxxxx> wrote:
> > >
> > > From: Rob Bradford <rbradford@xxxxxxxxxxxx>
> > >
> > > kvmtool does not support the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature
> > > but does advertise the VIRTIO_NET_F_GUEST_TSO{4,6} features. Check that
> > > the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature is present before setting
> > > the NETIF_F_GRO_HW feature bit as otherwise
>
> Here are settings for dev->features and dev->hw_features.
>
>
> > > an attempt will be made to
> > > program the virtio-net device using the ctrl queue which will fail.
> > >
> > > This resolves the following error when running on kvmtool:
>
> Can you talk about it in detail what it did?

In the updated v3 version of the patch I went into a lot more detail,
particularly of why the bit was being cleared and triggering the
control queue reprogramming. Based on that I also adjusted the
conditional check.

Cheers,

Rob