Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1018133ybz; Thu, 16 Apr 2020 00:59:23 -0700 (PDT) X-Google-Smtp-Source: APiQypKx6T/aYo+Yg18fxV1qgeYVZ+tgaDZNRXbW2LYkHTiAWj/svTHW/kknkIX90i+/CNRzJgiS X-Received: by 2002:a05:6402:c82:: with SMTP id cm2mr28619985edb.358.1587023963142; Thu, 16 Apr 2020 00:59:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587023963; cv=none; d=google.com; s=arc-20160816; b=U5nhZWXerRGqCTpfWb9k0QVUhGgrC2m3TCPOC2oDT2rfdifDqg3N/FU/7MVXmz774r pRDtnoXi8wNaeEpQJ+p2CSfnWh0RdLIfgaRJGIKTEf0KU9JxcONHtU4l4j8eyK9IFKrG oOihApJeZdogzdFSl0yT3LULTG7S+tyFqdWAlwiMgpCBTsPeZEPN2d3KSPr21IOkwgOT LjbjCJUrOh9d0CmTLdkvyxqADtmyCDIu2z0OjhzdDFlzAaD6UUmVdw5n5pWPdDh/jt4p xz7poYpvWUD/WBwumgdrgi9n/Z0ioMJFYHysahjMxoHQ8gkiJrQf3I37O4F15DKlECOb GNhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=tgxXuDfLVs6iIVTGmU8+FmsYYfOK74J74eQhEPVIacc=; b=kJPjNu17EBBihZ69x660xmbzt+8a46lMFYZ8yuMM9JBV2+UqSyZQmzKqcfGKvUcdyJ SagD2fsEvxlfNe0MS9Izd+FhFT/FMGSPw0QBiD14P5ViKarj4y7hVCF5YTDSIW35I60F y7yH2O14LBlAOJm+LL8P8plQxZ6rjHmjrzC2EhVBClB9LkDR2gmJD3e4v1UEVbsZf7dK usXgOmBr0t/X0VlZe17kPX85CdFsKvwcmvy8WziJhYFobV9rscvs6G51ECNytD1oT5yc DgkzuZCrLmegXs/SLiby0mIjZOSWUwxasvCE8dZW17c+kFIBhhSx3/BnbKLDp/QLEJe7 iYJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HDkGgjg3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si3798147ejr.224.2020.04.16.00.59.00; Thu, 16 Apr 2020 00:59:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HDkGgjg3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440171AbgDPH51 (ORCPT + 99 others); Thu, 16 Apr 2020 03:57:27 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39148 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2440156AbgDPH5A (ORCPT ); Thu, 16 Apr 2020 03:57:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587023819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tgxXuDfLVs6iIVTGmU8+FmsYYfOK74J74eQhEPVIacc=; b=HDkGgjg3dVx8iwJBYbDMx8AftG6nTMeVBD2Etl7Lji9JcDBWwEh3CYBKzHwPB6y9Y33Vvd Ti37oopaVwIQTSkUqt6R7Cwkx+Thld9cKNUJFLRkoIYcm2krcpFqdYx+3EKRiglLQvx25d bTivJf/VIwzDfXspc0q9WuLUrXre49M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460-MvXKLtxgOCKXkjX_gSKkhg-1; Thu, 16 Apr 2020 03:56:54 -0400 X-MC-Unique: MvXKLtxgOCKXkjX_gSKkhg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9252C8017F3; Thu, 16 Apr 2020 07:56:52 +0000 (UTC) Received: from eperezma.remote.csb (ovpn-112-194.ams2.redhat.com [10.36.112.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DD6F7E7C0; Thu, 16 Apr 2020 07:56:47 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: "Michael S. Tsirkin" Cc: Stephen Rothwell , "virtualization@lists.linux-foundation.org" , Christian Borntraeger , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Linux Next Mailing List , kvm list , Cornelia Huck , Halil Pasic , "linux-kernel@vger.kernel.org" Subject: [PATCH v2 0/8] tools/vhost: Reset virtqueue on tests Date: Thu, 16 Apr 2020 09:56:35 +0200 Message-Id: <20200416075643.27330-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series add tests used to validate the "vhost: Reset batched descriptors on SET_VRING_BASE call" series, with a few minor updates of them. They are based on the tests sent back them, the ones that were not included (reasons in that thread). This series changes: * Delete need to export the ugly function in virtio_ring, now all the code is added in tools/virtio (except the one line fix). * Add forgotten uses of vhost_vq_set_backend. Fix bad usage order in vhost_test_set_backend. * Drop random reset, not really needed. * Minor changes. This patchset commit messages contains references to commits under "for_linus" tag and references to commits in for_linus..mst/vhost. They are fixes, so probably it is better just to squash if possible: ("7c48601a3d4d tools/virtio: Add --reset=3Drandom"): Already in for_linus ("af3756cfed9a vhost: batching fetches"): Only in vhost branch, not in for_linus. Thanks! Changes from v1: * Different base, since branch was force-pushed. * Using new vring_legacy_*, as base uses them now. This serie is meant to be applied on top of 503b1b3efb47e267001beba8e0759c15fa3e9be7 in git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git. Eugenio P=C3=A9rez (8): tools/virtio: fix virtio_test.c indentation vhost: Not cleaning batched descs in VHOST_SET_VRING_BASE ioctl vhost: Replace vq->private_data access by backend accesors vhost: Fix bad order in vhost_test_set_backend at enable tools/virtio: Use __vring_new_virtqueue in virtio_test.c tools/virtio: Extract virtqueue initialization in vq_reset tools/virtio: Reset index in virtio_test --reset. tools/virtio: Use tools/include/list.h instead of stubs drivers/vhost/test.c | 8 ++--- drivers/vhost/vhost.c | 1 - tools/virtio/linux/kernel.h | 7 +---- tools/virtio/linux/virtio.h | 5 ++-- tools/virtio/virtio_test.c | 58 +++++++++++++++++++++++++++---------- tools/virtio/vringh_test.c | 2 ++ 6 files changed, 51 insertions(+), 30 deletions(-) --=20 2.18.1