[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [RFC] vhost-user: don't ignore CTRL_VLAN feature
From: |
Tiwei Bie |
Subject: |
Re: [Qemu-stable] [RFC] vhost-user: don't ignore CTRL_VLAN feature |
Date: |
Wed, 12 Jun 2019 10:11:57 +0800 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Tue, Jun 11, 2019 at 10:10:14AM -0400, Michael S. Tsirkin wrote:
> On Tue, Jun 11, 2019 at 02:51:37PM +0800, Tiwei Bie wrote:
> > The VIRTIO_NET_F_CTRL_VLAN feature requires the support of
> > vhost-user backend. But it will be advertised to guest driver
> > as long as it's enabled by users in QEMU, while it's not
> > supported by vhost-user backend. This patch fixes this issue.
>
> Fixes by making guest refuse to send vlan tags?
Fixes by not advertising this feature bit to guest driver
when it's not supported, and guest won't expect the device
to do vlan filtering then.
> I agree it seems cleaner, but which guests does this actually help?
>
> > Fixes: 72018d1e1917 ("vhost-user: ignore qemu-only features")
> > Cc: address@hidden
> >
> > Signed-off-by: Tiwei Bie <address@hidden>
>
> A change like that will break migration compatibility, will it not?
Yeah, that's a problem...
> Maybe we need to tie it to a machine version somehow...
>
>
> > ---
> > It's not clear in the spec that, whether vlan filtering is
> > also best-effort:
> > https://github.com/oasis-tcs/virtio-spec/blob/37057052e7/content.tex#L3372
>
> So what breaks if we declare it best effort for now?
> And does it really help if we report that vlan filtering
> is not supported to guests?
If it's best effort, then it won't violate the spec to
advertise this feature when it's not supported in backends.
>
>
>
> > hw/net/vhost_net.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
> > index a6b719035c..1444fc9230 100644
> > --- a/hw/net/vhost_net.c
> > +++ b/hw/net/vhost_net.c
> > @@ -75,6 +75,8 @@ static const int user_feature_bits[] = {
> > VIRTIO_NET_F_MTU,
> > VIRTIO_F_IOMMU_PLATFORM,
> >
> > + VIRTIO_NET_F_CTRL_VLAN,
> > +
> > /* This bit implies RARP isn't sent by QEMU out of band */
> > VIRTIO_NET_F_GUEST_ANNOUNCE,
> >
> > --
> > 2.17.1