Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp683176ybb; Fri, 3 Apr 2020 09:54:13 -0700 (PDT) X-Google-Smtp-Source: APiQypJ2BbL8mGVyt8a/kWcI3r5eRrvqrX6EPzp8Ja+yb3YpD0HwPp1KFTk+i0b1JH4pvnv47Xv6 X-Received: by 2002:aca:efd4:: with SMTP id n203mr3839895oih.159.1585932853704; Fri, 03 Apr 2020 09:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585932853; cv=none; d=google.com; s=arc-20160816; b=B6l2dlJBX4CNCKzJViH0DTW/g6wbDVlwWV9Q/KvgSvYChsOsvRrHp9iR96/hXI/TaN vGN2flWfwq6KPT+bzhPk+aKYvJJyDytob8r8VPv9p3usB5jpdyDx4pnvubszzGzXFhCd M8m3D3ns9wLN9YtXgiu2a4GsHRxp8l6jOR8/JvzJbaNDD15DdtD8UHCNSdXgdFWOX+z0 9z9Prp1BjPx2fpv1Kv239sALuFfl1F37/OlO3KnBxeKvUX58Z3nXaWAbK7J7rf6B3+7g eehSpE1O2cb6bwGa31g9Z/0/6mEfA78Lc5kT2KOO4FKg+f9J4cG/CSTMSk4bualcCetK NtcQ== 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=nhFm16Rn59ljHy8zT4BNa+1TatqX7wOcSX4H/Bklex4=; b=Y23K2d6P61Dre1aLjkwW5jOTXSACsl6pDqabrnRZL/nBU5Nh0JTshvA3UNfatOqGT4 ZABl/bhHTEn61K/xKtQvt2bgWu3YZPrPVmDEneqAdBNt+HJL08oOfMnKyu6gDplyRkOo o22xCDckgffHIXrfny4RP8tgTpukzSphx1h4B27AoBEN5ZMJHFyV+3cRtwkDT/b0V5Uq uAkw3FVP1V0WidMkyaSHySUCmmdhWGI+Eli1ThC1iJm0JtBjU/KgykDuvkDWvM65lKkO xz4Kag/P6IObXH7lWr7i0CoLj0NbJT2Y19fiOaOLzXiJYdaUoD00N/l9HstBCw+SWetv vWpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DueBsMQG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id p203si4031193oic.214.2020.04.03.09.54.00; Fri, 03 Apr 2020 09:54:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DueBsMQG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728337AbgDCQve (ORCPT + 99 others); Fri, 3 Apr 2020 12:51:34 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28854 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728095AbgDCQvd (ORCPT ); Fri, 3 Apr 2020 12:51:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585932693; 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=nhFm16Rn59ljHy8zT4BNa+1TatqX7wOcSX4H/Bklex4=; b=DueBsMQG+NjUPDWT61M9xcR0tKkjqppmrYhnqTr8XukKhIrtxFInG1he1z4a/rlt06uPw+ M+Vd6XvLp0KZUdSpxylPJkYXk7Mz67bY1qCRj1ue32WUbsdW9TwNO2xCRrM4LuJwYM6/06 x4K9nzC/L4Ldgq8euqWjSE/pf5zYRJ4= 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-318-vq3TbPQyPVGdok5uH-fH2g-1; Fri, 03 Apr 2020 12:51:30 -0400 X-MC-Unique: vq3TbPQyPVGdok5uH-fH2g-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 A4748100550D; Fri, 3 Apr 2020 16:51:28 +0000 (UTC) Received: from eperezma.remote.csb (ovpn-113-28.ams2.redhat.com [10.36.113.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D4AA18A85; Fri, 3 Apr 2020 16:51:23 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: "Michael S. Tsirkin" Cc: kvm list , "virtualization@lists.linux-foundation.org" , Linux Next Mailing List , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Stephen Rothwell , Cornelia Huck , Halil Pasic , "linux-kernel@vger.kernel.org" , Christian Borntraeger Subject: [PATCH 0/8] tools/vhost: Reset virtqueue on tests Date: Fri, 3 Apr 2020 18:51:11 +0200 Message-Id: <20200403165119.5030-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 the tests used to validate the "vhost: Reset batched descriptors on SET_VRING_BASE call" series, with a small change on the reset code (delete an extra unneded reset on VHOST_SET_VRING_BASE). 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 updating tests code. This serie is meant to be applied on top of 5de4e0b7068337cf0d4ca48a4011746410115aae 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