Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1458711ybh; Sun, 19 Jul 2020 21:14:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7/hJWLPEQWYlN9KxT+0hu2GH1vGrjdzVhRzlilbu2C1DXH3OLkxMed17NZZ4OLkAOL0h2 X-Received: by 2002:a05:6402:1a54:: with SMTP id bf20mr19999306edb.69.1595218464477; Sun, 19 Jul 2020 21:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595218464; cv=none; d=google.com; s=arc-20160816; b=jcDLjBIgpoJ/IdZy0ttQ2eyqkSa/py+l6xpCduKhd7zkLJMSNgG7BpzXF4O3+XmXa9 vgrKHS/rHPH8wemnoiJqhksJYpvq2uvzJF6cf2lqV6dttfjgtchw13mU6c81X4Ueqv1S rahhvuMx+blp6Hnvait7Icy47xMF29YdJHzbe99Zer/gVpmKEvNXTyicYZgsZW0Txu6o RV5S7e3cbeSeRaqRldXQTVw2UTKdz0bSxIsPMgbY52AwcVy9Zn//Q1zQlL3ugtq59ec0 qF6AftwR0xFvsZm3M9OWplJ+DYbfyTPfFOtkHRIx1gqeE1cvcnLwsOBa6M+j4soG+XWG d52g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=5W6bavoC2QFTavpGU5cs5NwNxhTst/1scGklkKaWEu8=; b=MiDakLVKoG3xMlZbn9vI9SKaYbAU9VA+2SW5sitZiCURPLA256nWDU3xOH15aTpol2 PevWeaSMsm/ctL0qChMjeUnWc0gahpIr0I+c+Cdk0yqATJ7WReGPEFFvH40YKLPMNc4I Jzv/VtP9AFQss0pf3mqmGgtXIupENjdNWRrwFVokSirC1i3XR/h+FTdn9UD9h1S+5agL xhI5ww3F8MKG+D4qtU5eoKD8Odbzl/K4Pn9i5MSztb+zs25jtSIWvssGUloj5sOa9sW8 8PLC2BEmyem956gp5b67crhTkLsW0y2f2yB+/HxYQSB4+tlttRyNgMETtvypiHAgxSAb P2Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EiTFv+f0; 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 l6si9974911ejx.493.2020.07.19.21.14.00; Sun, 19 Jul 2020 21:14:24 -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=EiTFv+f0; 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 S1726010AbgGTENi (ORCPT + 99 others); Mon, 20 Jul 2020 00:13:38 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:56510 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725263AbgGTENi (ORCPT ); Mon, 20 Jul 2020 00:13:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595218416; 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=5W6bavoC2QFTavpGU5cs5NwNxhTst/1scGklkKaWEu8=; b=EiTFv+f03gcwEcBEXkec1vyRRmKqqj6fLg2Qfvd3FHaqc4RQqS7cJnzZS5zHHXLKE5geam sqVAsSUJOZ8aP4OhLxl2KWjoQzwWecGIC/isjUwQJyLBOIAMXXbnm2i6xKgjtvy7IGmGM1 Pg++RDc62C+w3yTlMmPuZDRHrSTqgvk= 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-160-imyCPF87OSKWeaQHXtT7jw-1; Mon, 20 Jul 2020 00:13:33 -0400 X-MC-Unique: imyCPF87OSKWeaQHXtT7jw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B5D288064DD; Mon, 20 Jul 2020 04:13:31 +0000 (UTC) Received: from [10.72.13.139] (ovpn-13-139.pek2.redhat.com [10.72.13.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7918A5C1B2; Mon, 20 Jul 2020 04:13:26 +0000 (UTC) Subject: Re: [PATCH vhost next 06/10] vdpa: Add means to communicate vq status on get_vq_state To: Eli Cohen Cc: mst@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, shahafs@mellanox.com, saeedm@mellanox.com, Parav Pandit References: <20200716072327.5359-1-eli@mellanox.com> <20200716072327.5359-7-eli@mellanox.com> <20200716082116.GA182860@mtl-vdi-166.wap.labs.mlnx> <296e6fcb-946c-f577-2e22-46528f78fda9@redhat.com> <20200716102533.GB186790@mtl-vdi-166.wap.labs.mlnx> From: Jason Wang Message-ID: <0ed28d74-cb0c-89af-61dd-9256e8bb2328@redhat.com> Date: Mon, 20 Jul 2020 12:13:24 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200716102533.GB186790@mtl-vdi-166.wap.labs.mlnx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/7/16 下午6:25, Eli Cohen wrote: > On Thu, Jul 16, 2020 at 05:35:18PM +0800, Jason Wang wrote: >> On 2020/7/16 下午4:21, Eli Cohen wrote: >>> On Thu, Jul 16, 2020 at 04:11:00PM +0800, Jason Wang wrote: >>>> On 2020/7/16 下午3:23, Eli Cohen wrote: >>>>> Currently, get_vq_state() is used only to pass the available index value >>>>> of a vq. Extend the struct to return status on the VQ to the caller. >>>>> For now, define VQ_STATE_NOT_READY. In the future it will be extended to >>>>> include other infomration. >>>>> >>>>> Modify current vdpa driver to update this field. >>>>> >>>>> Reviewed-by: Parav Pandit >>>>> Signed-off-by: Eli Cohen >>>> What's the difference between this and get_vq_ready()? >>>> >>>> Thanks >>>> >>> There is no difference. It is just a way to communicate a problem to >>> with the state of the VQ back to the caller. This is not available now. >>> I think an asynchronous is preferred but that is not available >>> currently. >> >> I still don't see the reason, maybe you can give me an example? >> >> > My intention was to provide a mechainsm to return meaningful information > on the state of the vq. For example, when you fail to get the state of > the VQ. > > Maybe I could just change the prototype of the function to return int > and the driver could put an error if it has trouble returning the vq > state. That's fine. Thanks