[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 5/7] tests/qtest/vhost-user-test: add support for the vhos
From: |
Dima Stepanov |
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 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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);
> >
- Re: [PATCH v4 2/7] vhost: check queue state in the vhost_dev_set_log routine, (continued)
- [PATCH v4 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class, Dima Stepanov, 2020/09/04
- [PATCH v4 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test, Dima Stepanov, 2020/09/04
- [PATCH v4 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk, Dima Stepanov, 2020/09/04
- [PATCH v4 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device, Dima Stepanov, 2020/09/04
- [PATCH v4 7/7] tests/qtest/vhost-user-test: enable the reconnect tests, Dima Stepanov, 2020/09/04