From: Dima Stepanov <dimastep@yandex-team.ru>
To: Raphael Norwitz <raphael.s.norwitz@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Thomas Huth <thuth@redhat.com>,
qemu-block@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
jasowang@redhat.com, QEMU <qemu-devel@nongnu.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Raphael Norwitz <raphael.norwitz@nutanix.com>,
fengli@smartx.com, yc-core@yandex-team.ru,
Paolo Bonzini <pbonzini@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v4 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk
Date: Wed, 9 Sep 2020 11:06:32 +0300 [thread overview]
Message-ID: <20200909080632.GA23110@dimastep-nix> (raw)
In-Reply-To: <CAFubqFvGNV3DVmnanhMZGaRzodAkAU8MboDd2T9W_P__KpUW8g@mail.gmail.com>
On Tue, Sep 08, 2020 at 11:01:57PM -0400, Raphael Norwitz wrote:
> On Fri, Sep 4, 2020 at 5:34 AM Dima Stepanov <dimastep@yandex-team.ru> wrote:
> >
> > Add support for the vhost-user-blk-pci device. This node can be used by
> > the vhost-user-blk tests. Tests for the vhost-user-blk device are added
> > in the following patches.
> >
> > Signed-off-by: Dima Stepanov <dimastep@yandex-team.ru>
> > ---
> > tests/qtest/libqos/virtio-blk.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/tests/qtest/libqos/virtio-blk.c b/tests/qtest/libqos/virtio-blk.c
> > index 5da0259..959c5dc 100644
> > --- a/tests/qtest/libqos/virtio-blk.c
> > +++ b/tests/qtest/libqos/virtio-blk.c
> > @@ -36,6 +36,9 @@ static void *qvirtio_blk_get_driver(QVirtioBlk *v_blk,
> > if (!g_strcmp0(interface, "virtio")) {
> > return v_blk->vdev;
> > }
> > + if (!g_strcmp0(interface, "vhost-user-blk")) {
>
> Small point but why not merge this conditional with the
> !g_strcmp0(interface, "virtio-blk") check above? They both return
> v_blk.
Good point, will made an update. Thanks!
>
> Otherwise looks good.
>
> > + return v_blk;
> > + }
> >
> > fprintf(stderr, "%s not present in virtio-blk-device\n", interface);
> > g_assert_not_reached();
> > @@ -120,6 +123,17 @@ static void virtio_blk_register_nodes(void)
> > qos_node_produces("virtio-blk-pci", "virtio-blk");
> >
> > g_free(arg);
> > +
> > + /* vhost-user-blk-pci */
> > + arg = g_strdup_printf("id=drv0,chardev=chdev0,addr=%x.%x",
> > + PCI_SLOT, PCI_FN);
> > + opts.extra_device_opts = arg;
> > + add_qpci_address(&opts, &addr);
> > + qos_node_create_driver("vhost-user-blk-pci", virtio_blk_pci_create);
> > + qos_node_consumes("vhost-user-blk-pci", "pci-bus", &opts);
> > + qos_node_produces("vhost-user-blk-pci", "vhost-user-blk");
> > +
> > + g_free(arg);
> > }
> >
> > libqos_init(virtio_blk_register_nodes);
> > --
> > 2.7.4
> >
> >
next prev parent reply other threads:[~2020-09-09 8:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 9:31 [PATCH v4 0/7] vhost-user-blk: fix the migration issue and enhance qtests Dima Stepanov
2020-09-04 9:31 ` [PATCH v4 1/7] vhost: recheck dev state in the vhost_migration_log routine Dima Stepanov
2020-09-08 14:25 ` Stefan Hajnoczi
2020-09-10 12:18 ` Dima Stepanov
2020-09-04 9:31 ` [PATCH v4 2/7] vhost: check queue state in the vhost_dev_set_log routine Dima Stepanov
2020-09-09 2:57 ` Raphael Norwitz
2020-09-04 9:31 ` [PATCH v4 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class Dima Stepanov
2020-09-09 3:00 ` Raphael Norwitz
2020-09-04 9:31 ` [PATCH v4 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk Dima Stepanov
2020-09-09 3:01 ` Raphael Norwitz
2020-09-09 8:06 ` Dima Stepanov [this message]
2020-09-04 9:31 ` [PATCH v4 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device Dima Stepanov
2020-09-09 3:03 ` Raphael Norwitz
2020-09-09 8:11 ` Dima Stepanov
2020-09-04 9:31 ` [PATCH v4 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test Dima Stepanov
2020-09-09 3:05 ` Raphael Norwitz
2020-09-04 9:31 ` [PATCH v4 7/7] tests/qtest/vhost-user-test: enable the reconnect tests Dima Stepanov
2020-09-09 3:06 ` Raphael Norwitz
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=20200909080632.GA23110@dimastep-nix \
--to=dimastep@yandex-team.ru \
--cc=dgilbert@redhat.com \
--cc=fengli@smartx.com \
--cc=jasowang@redhat.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=raphael.norwitz@nutanix.com \
--cc=raphael.s.norwitz@gmail.com \
--cc=thuth@redhat.com \
--cc=yc-core@yandex-team.ru \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).