qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device
Date: Wed, 9 Sep 2020 11:11:21 +0300	[thread overview]
Message-ID: <20200909081115.GB23110@dimastep-nix> (raw)
In-Reply-To: <CAFubqFuzoxNScgOdR3+dMNFDd0jcjQ2OdKeRZuFuXLEJ2hkNrQ@mail.gmail.com>

On Tue, Sep 08, 2020 at 11:03:56PM -0400, Raphael Norwitz wrote:
> On Fri, Sep 4, 2020 at 5:35 AM Dima Stepanov <dimastep@yandex-team.ru> wrote:
> >
> > Add vhost_user_ops structure for the vhost-user-blk device class. Add
> > the test_reconnect and test_migrate tests for this device.
> >
> > Signed-off-by: Dima Stepanov <dimastep@yandex-team.ru>
> 
> Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
> 
> Just one small suggestion.
> 
> > ---
> >  tests/qtest/vhost-user-test.c | 139 +++++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 137 insertions(+), 2 deletions(-)
> 
> > @@ -857,12 +911,21 @@ static void test_reconnect(void *obj, void *arg, QGuestAllocator *alloc)
> >  {
> >      TestServer *s = arg;
> >      GSource *src;
> > +    int nq;
> >
> > +    if (s->vu_ops->driver_init) {
> > +        s->vu_ops->driver_init(obj, alloc);
> > +    }
> >      if (!wait_for_fds(s)) {
> >          return;
> >      }
> >
> 
> Maybe we could break this logic out into a helper? I imagine there may
> be other cases where we might want to get a number of rings for a
> given device type.
Yes, i've also thought about it and my point is that it isn't clear
right now how it will be used. So i decided to use it in the pretty
straigtforward way. As soon as we add some more vhost-user devices for
testing we can update this code properly.

> 
> 
> > -    wait_for_rings_started(s, 2);
> > +    nq = 1;
> > +    if (s->vu_ops->type == VHOST_USER_NET) {
> > +        /* tx and rx queues */
> > +        nq = 2;
> > +    }
> > +    wait_for_rings_started(s, nq);
> >


  reply	other threads:[~2020-09-09  8:13 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
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 [this message]
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=20200909081115.GB23110@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).