Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1779545ybz; Thu, 16 Apr 2020 15:34:33 -0700 (PDT) X-Google-Smtp-Source: APiQypLcFc3ewhHafBlpoT0x7xgeF7CW9v1TdEpj3cYXdNDoMKMBRrT0yqSNO0ufDhj/X8JNL/EV X-Received: by 2002:a17:907:2170:: with SMTP id rl16mr262704ejb.238.1587076473041; Thu, 16 Apr 2020 15:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587076473; cv=none; d=google.com; s=arc-20160816; b=aZxm8VvCdoCOWYdqIFqMtsyTul8RAB2vfFR83s8MU9h+sJtZv8zP9vJlkStCCzR8mQ k+BDVwXSGJV+oNU/fyp+KMziKdEyu7N6cmK28DITK8sOyQMXN+/Jg+rsGoq3Y6xp82Jt tpzj7iCK4YAHeXDB6JpR3xQ/P0IhAZDOVTeDTOC/yOYbUWLq2iqdkC2KACxS5j8q2b3X CvTAhG7vVQ04PB8Ewj9MaElYXn1Xctmk095hcZjEIZ+SDH5pD36XXIwTUay9TrrFL8FA gXQLn8sINFkZlePQ47AD0WBu50GdqhCqVygzYsvKqBWMTS2foAVJ09oZiN0kJeDZgKFw wGaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qUf9DXimPD8UBiVLdfnQM98oUkmHdl6eiPE6mf0vIko=; b=bd5/ZQs358DRYPrOWPXQ/IbHg4b+G7GxO4ePMQpMtypaQSyYUrsoFPyDJ+bCsTj0oP aKfYs939uorLOgpdUJOswwc+liYNm/VxYjocjLngpyhALlvbMFOSozv5pN9dxihvWVYE PHFNezQBDWFn+iuCnaunXgvnc8MBQHOn839cZW0JkZ8oH15whCcXXE7Gc/MpDHXcSmnA UGNp7IBj8r3Gy3r54fyEpjuCC3stuPsLNhzbJ1JCXilgvF/uHIVDz4nO9QsF1wy0z4Ba ZWyPNfb3SwkrBlhJa7EJLbp+dajQsEj8HK6rWYdcq/+LslRs32PTqyY7x6x2WFapCe0E PKrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Sps5ULMq; 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 ox16si6063392ejb.427.2020.04.16.15.34.05; Thu, 16 Apr 2020 15:34:33 -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=Sps5ULMq; 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 S1729059AbgDPWdG (ORCPT + 99 others); Thu, 16 Apr 2020 18:33:06 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:60208 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728460AbgDPWdE (ORCPT ); Thu, 16 Apr 2020 18:33:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587076383; 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: in-reply-to:in-reply-to:references:references; bh=qUf9DXimPD8UBiVLdfnQM98oUkmHdl6eiPE6mf0vIko=; b=Sps5ULMq4ITIhAj/rLvb95C6Fp04EONH3OvrUE5JSk4+D6z3FivwwiNo2AqBQkSrgLJf2F CzTaNbUZ/ExTmC94a7wvFhU0QW24k+p+0kRpIyD6NGAo9RwBt6QjOfSdbSVTNyiaeGqzC5 oFGeC3SD4d38HRyq63tF0KQP4t15RXQ= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-448-RGkDskWaOmSH1H_nMoNpdw-1; Thu, 16 Apr 2020 18:33:01 -0400 X-MC-Unique: RGkDskWaOmSH1H_nMoNpdw-1 Received: by mail-wm1-f69.google.com with SMTP id o5so125219wmo.6 for ; Thu, 16 Apr 2020 15:33:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=qUf9DXimPD8UBiVLdfnQM98oUkmHdl6eiPE6mf0vIko=; b=tGpXtEq/wW3VnKx8mDd++Ve+CC+FC2X6M5zp01RYve7Ph2RkEt+vcAdbaERcSOKpZx LGpf9p9ez6dO4n8+6Nm6/xPRatoLaVcS2abjGZZvKK6zdsKlN9dA2vXqpdeWkHAEQ596 JS1USOFXkm6SfqQNx9oCqnZePUEUF9ZZ8tKQ0yZp6cBOVq0fGKsufAcvaGYM06oEinBY hrFf2TqOJoT148xAoWuLVvWuv3XkNW0xKURtE2ijsqmdWDv1w879ASm586dnGnsc1AZX spriyyG1h/ZAq3RLtjw+IEKcfyRSGIb92V6MjGmLUdaSfYpMk88MXpUXXwDp7ekf9LON 12lQ== X-Gm-Message-State: AGi0PuYg9g0lt4Ou0+0mKb9zxg9ndlDo4X9NBdMnnXQh9ilsMswE09r9 nZaVhVjPYAOIltjoCIcujMLxpm4of+ZYZh0K5zPCmks8Mt3Kr8U7dJoP7NfehAnCUrW9tE9u1LI qeK8YCgT+GS1S4TtiaFi8bHfP X-Received: by 2002:a7b:ce81:: with SMTP id q1mr106316wmj.156.1587076380276; Thu, 16 Apr 2020 15:33:00 -0700 (PDT) X-Received: by 2002:a7b:ce81:: with SMTP id q1mr106300wmj.156.1587076380092; Thu, 16 Apr 2020 15:33:00 -0700 (PDT) Received: from redhat.com (bzq-79-183-51-3.red.bezeqint.net. [79.183.51.3]) by smtp.gmail.com with ESMTPSA id h137sm6135220wme.0.2020.04.16.15.32.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 15:32:59 -0700 (PDT) Date: Thu, 16 Apr 2020 18:32:56 -0400 From: "Michael S. Tsirkin" To: Eugenio =?iso-8859-1?Q?P=E9rez?= Cc: Stephen Rothwell , "virtualization@lists.linux-foundation.org" , Christian Borntraeger , Linux Next Mailing List , kvm list , Cornelia Huck , Halil Pasic , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 5/8] tools/virtio: Use __vring_new_virtqueue in virtio_test.c Message-ID: <20200416183244-mutt-send-email-mst@kernel.org> References: <20200416075643.27330-1-eperezma@redhat.com> <20200416075643.27330-6-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200416075643.27330-6-eperezma@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 16, 2020 at 09:56:40AM +0200, Eugenio P?rez wrote: > As updated in ("2a2d1382fe9d virtio: Add improved queue allocation API") > > Signed-off-by: Eugenio P?rez Pls add motivation for these changes. > --- > tools/virtio/virtio_test.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c > index 1d5144590df6..d9827b640c21 100644 > --- a/tools/virtio/virtio_test.c > +++ b/tools/virtio/virtio_test.c > @@ -106,10 +106,9 @@ static void vq_info_add(struct vdev_info *dev, int num) > assert(r >= 0); > memset(info->ring, 0, vring_legacy_size(num, 4096)); > vring_legacy_init(&info->vring, num, info->ring, 4096); > - info->vq = vring_new_virtqueue(info->idx, > - info->vring.num, 4096, &dev->vdev, > - true, false, info->ring, > - vq_notify, vq_callback, "test"); > + info->vq = > + __vring_new_virtqueue(info->idx, info->vring, &dev->vdev, true, > + false, vq_notify, vq_callback, "test"); > assert(info->vq); > info->vq->priv = info; > vhost_vq_setup(dev, info); > -- > 2.18.1