From: "Michael S. Tsirkin" <mst@redhat.com>
To: Andrey Korolyov <andrey@xdel.ru>
Cc: Jason Wang <jasowang@redhat.com>,
qemu-stable@nongnu.org,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack
Date: Wed, 3 Sep 2014 12:17:53 +0300 [thread overview]
Message-ID: <20140903091753.GA7960@redhat.com> (raw)
In-Reply-To: <CABYiri-73okdWx1jcQs2LNeo58rogykyYgdBbgMAFpW+a+cLbg@mail.gmail.com>
On Wed, Sep 03, 2014 at 12:54:03PM +0400, Andrey Korolyov wrote:
> On Wed, Sep 3, 2014 at 12:52 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Wed, Sep 03, 2014 at 02:25:30PM +0800, Jason Wang wrote:
> >> commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add
> >> vhost_get_features and vhost_ack_features) removes the step that
> >> initializes the acked_features to backend_features. This will result an
> >> unexpected value of acked_features which may fail the features setting of
> >> vhost. This patch fixes it by recover this step.
> >>
> >> Cc: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
> >> Cc: Andrey Korolyov <andrey@xdel.ru>
> >> Cc: Michael S. Tsirkin <mst@redhat.com>
> >> Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
> >> Cc: qemu-stable@nongnu.org
> >> Signed-off-by: Jason Wang <jasowang@redhat.com>
> >
> > OK I get it and it's correct, but I think it's better to
> > put the initialization in core vhost code.
> > Patch sent, could you confirm that it works for you please?
> >
> >> ---
> >> hw/net/vhost_net.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
> >> index f87c798..b1d4b1f 100644
> >> --- a/hw/net/vhost_net.c
> >> +++ b/hw/net/vhost_net.c
> >> @@ -115,6 +115,7 @@ unsigned vhost_net_get_features(struct vhost_net *net, unsigned features)
> >>
> >> void vhost_net_ack_features(struct vhost_net *net, unsigned features)
> >> {
> >> + net->dev.acked_features = net->dev.backend_features;
> >> vhost_ack_features(&net->dev, vhost_net_get_feature_bits(net), features);
> >> }
> >>
> >> --
> >> 1.8.3.1
>
> Yes, this patch fixes both issues with vhost subsystem for me.
OK, applied, thanks!
But let's hack on the assert a bit more: apparently something
is wrong with the userspace fallback: after init failure,
it should never trigger, and it does.
--
MST
next prev parent reply other threads:[~2014-09-03 9:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 6:25 [Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack Jason Wang
2014-09-03 8:30 ` Michael S. Tsirkin
2014-09-03 8:52 ` Michael S. Tsirkin
2014-09-03 8:54 ` Andrey Korolyov
2014-09-03 9:08 ` Michael S. Tsirkin
2014-09-03 9:17 ` Michael S. Tsirkin [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-09-03 8:50 Michael S. Tsirkin
2014-09-03 8:54 ` 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=20140903091753.GA7960@redhat.com \
--to=mst@redhat.com \
--cc=andrey@xdel.ru \
--cc=jasowang@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=n.nikolaev@virtualopensystems.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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.