From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Maciej Szymański" <maciej.szymanski@opensynergy.com>
Cc: Willem de Bruijn <willemb@google.com>,
virtualization <virtualization@lists.linux-foundation.org>
Subject: Re: virtio-net: Unpermitted usage of virtqueue before virtio driver initialization
Date: Wed, 20 Apr 2022 07:10:49 -0400 [thread overview]
Message-ID: <20220420070944-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <0a118236-bb98-9183-8be2-84f6b83e2581@opensynergy.com>
On Wed, Apr 20, 2022 at 10:17:27AM +0200, Maciej Szymański wrote:
> > > > > > Hmm so we have this:
> > > > > >
> > > > > >
> > > > > > if ((dev->features ^ features) & NETIF_F_GRO_HW) {
> > > > > > if (vi->xdp_enabled)
> > > > > > return -EBUSY;
> > > > > >
> > > > > > if (features & NETIF_F_GRO_HW)
> > > > > > offloads = vi->guest_offloads_capable;
> > > > > > else
> > > > > > offloads = vi->guest_offloads_capable &
> > > > > > ~GUEST_OFFLOAD_GRO_HW_MASK;
> > > > > >
> > > > > > err = virtnet_set_guest_offloads(vi, offloads);
> > > > > > if (err)
> > > > > > return err;
> > > > > > vi->guest_offloads = offloads;
> > > > > > }
> > > > > >
> > > > > > which I guess should have prevented virtnet_set_guest_offloads
> > > > > > from ever running.
> > > > > >
> > > > > > From your description it sounds like you have observed this
> > > > > > in practice, right?
> > > > > >
> > > Yes. I have proprietary virtio-net device which advertises following
> > > guest offload features :
> > > - VIRTIO_NET_F_GUEST_CSUM
> > > - VIRTIO_NET_F_GUEST_TSO4
> > > - VIRTIO_NET_F_GUEST_TSO6
> > > - VIRTIO_NET_F_GUEST_UFO
> > >
> > > This feature set passes the condition in virtnet_set_features.
So why isn't dev->features equal to features?
--
MST
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2022-04-20 11:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c0c17b91-747e-ab58-83e5-b6f7dfa55e75@opensynergy.com>
2022-04-19 15:03 ` virtio-net: Unpermitted usage of virtqueue before virtio driver initialization Michael S. Tsirkin
2022-04-20 3:07 ` Jason Wang
2022-04-20 6:35 ` Michael S. Tsirkin
2022-04-20 8:05 ` Jason Wang
[not found] ` <4080d799-b42e-018a-8b14-621295e55a8d@opensynergy.com>
2022-04-20 8:07 ` Jason Wang
[not found] ` <0a118236-bb98-9183-8be2-84f6b83e2581@opensynergy.com>
2022-04-20 11:10 ` Michael S. Tsirkin [this message]
[not found] ` <4050a523-85a8-0f3c-b7de-c371a42c8f6c@opensynergy.com>
2022-04-20 17:54 ` Michael S. Tsirkin
[not found] ` <06dc4f89-1770-67cc-a843-6e956c0504dc@opensynergy.com>
2022-04-20 20:17 ` Michael S. Tsirkin
2022-04-21 2:47 ` Jason Wang
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=20220420070944-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=maciej.szymanski@opensynergy.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=willemb@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.