From patchwork Sat Apr 18 10:22:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eugenio Perez Martin X-Patchwork-Id: 11496489 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB6F413B2 for ; Sat, 18 Apr 2020 10:23:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4252221F4 for ; Sat, 18 Apr 2020 10:23:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CE1Q/Z9Q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726117AbgDRKXf (ORCPT ); Sat, 18 Apr 2020 06:23:35 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:28293 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725903AbgDRKWi (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_P=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_P=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 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@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Ă©rez (8): vhost: Not cleaning batched descs in VHOST_SET_VRING_BASE ioctl tools/virtio: Add --batch option tools/virtio: Add --batch=random 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(-)