Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1550472ybz; Sat, 18 Apr 2020 03:25:17 -0700 (PDT) X-Google-Smtp-Source: APiQypLRUKPz8ZNxW9M7YlZQDSJsYWAR/kUVffGcEI4LS5PWouKnIGW1bWmF8i3RuD0TFTAjcP9C X-Received: by 2002:a17:906:66c1:: with SMTP id k1mr7305743ejp.208.1587205516939; Sat, 18 Apr 2020 03:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587205516; cv=none; d=google.com; s=arc-20160816; b=Ro7od0p8MrzByM9j4ColwMv6YnVvVZXRt9WsUKyBsQZMVvfvUVHr1/dE4c/P06zhe7 h+HobAe2XAXr4bNYN1rjtdTUgd5mSNjnxcQt+/TtaU9xGksvDbxbn9dX5ydMcmS0qXJT fuJybswAMXY1HQvC91+PMn3i9Hp79qik765riEeYFdF9eqdrlnoCtF27ydnk4Etnsn3Y OMBIM0LBLX128h60fvdjID3kaL/a7daf928XqYZXu/yjp7JMV+SShb6BvGXP8LyLQqa8 u2EZWgfblbHuJaeqSlfj/Db+5hqUGO0q4ejf0lPsgdcymdRN0S9EkSK6oB6Ni763su0T Oa5A== 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=1YUNj0J7TkJiSbunnXUbMtu2GWAgY2j7p/Zlm7bbq2k=; b=cSNm7O9Lgc0valIzM9R7ZAA+FWxTHsMaQroc1nsBKVaEhVIe4KukaQMKcx+imgnnhl lCr7Pub/aeqR3tgtrVO3oGos4BSKRLlTXoKweY18HMo2p7MZTHs149NtdRNu2YipyGGP 4p0nux2GZT93jjxX+pjXCrqhmS2NlQGMLnbjDRD0OVpJGzN265Ecq6AyBiZDWEP/Dl8W 1d10cHLZXlQxdXeV2lhdm6Ak9fzxWwv7auplgV2sAGYOi6bXELSiDdAUKYO7UifCpQSY Ww9lteMQ4yxpMnBOfnUL6DIsLbRAA6tlTSfUKcrGISWE8Tyx75e9pk3YvGVnIlE8USx3 3dhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="CE1Q/Z9Q"; 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 s15si10844031edr.462.2020.04.18.03.24.54; Sat, 18 Apr 2020 03:25:16 -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="CE1Q/Z9Q"; 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 S1726121AbgDRKXg (ORCPT + 99 others); Sat, 18 Apr 2020 06:23:36 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:36578 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725939AbgDRKWi (ORCPT ); Sat, 18 Apr 2020 06:22:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587205352; 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=1YUNj0J7TkJiSbunnXUbMtu2GWAgY2j7p/Zlm7bbq2k=; b=CE1Q/Z9Qv+jRm71HhrdWp1SfeALjhMN/yBtVANoo2dHinoqeegaC1CfZ6zCmwmA5uYZ6Nj rTdSIMrEfiKhyogjRCF0duA2qLgTJLBkcKjSesM7m/W2mOtYvwZ06kAKYQ8XIoT07jFfK8 taFTaVmWCLwSuRz00WyHFkW43CCCnzE= 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-392-hFGc7cjiNHuGB6rKmK9-Hg-1; Sat, 18 Apr 2020 06:22:29 -0400 X-MC-Unique: hFGc7cjiNHuGB6rKmK9-Hg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AD31418B9FC1; Sat, 18 Apr 2020 10:22:26 +0000 (UTC) Received: from eperezma.remote.csb (ovpn-112-94.ams2.redhat.com [10.36.112.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 296401000325; Sat, 18 Apr 2020 10:22:21 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: "Michael S. Tsirkin" Cc: "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , Halil Pasic , Cornelia Huck , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Christian Borntraeger , kvm list , Stephen Rothwell , Linux Next Mailing List Subject: [PATCH v3 0/8] tools/vhost: Reset virtqueue on tests Date: Sat, 18 Apr 2020 12:22:09 +0200 Message-Id: <20200418102217.32327-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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. The first patch of this patchset ("vhost: Not cleaning batched descs in VHOST_SET_VRING_BASE ioctl") should be squashed with ("vhost: batching fetches") (currenlty, commit e7539c20a4a60b3a1bda3e7218c0d2a20669f357 in mst repository vhost branch). Thanks! Changes from v2: * Squashed commits with fixes. * Back to plain vring_* 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 801f9bae9cf35b3192c3959d81a717e7985c64ed in git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git. Eugenio P=C3=A9rez (8): vhost: Not cleaning batched descs in VHOST_SET_VRING_BASE ioctl tools/virtio: Add --batch option tools/virtio: Add --batch=3Drandom option tools/virtio: Add --reset 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 | 57 +++++++++++++++ drivers/vhost/test.h | 1 + drivers/vhost/vhost.c | 1 - tools/virtio/linux/kernel.h | 7 +- tools/virtio/linux/virtio.h | 5 +- tools/virtio/virtio_test.c | 139 ++++++++++++++++++++++++++++++------ tools/virtio/vringh_test.c | 2 + 7 files changed, 182 insertions(+), 30 deletions(-) --=20 2.18.1