From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 712C4A0093; Mon, 18 May 2020 05:17:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B46DB1D443; Mon, 18 May 2020 05:17:31 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 3F3111D42A for ; Mon, 18 May 2020 05:17:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589771849; 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=o98HVvCDzPyqVFa6knFE2hUb3yqgNvhoBTS+7Ue4SXs=; b=iue35vmQktv24AfqhtcPo6HwZGiIHEp4oE8dIh3fEehQIs2iKY7CAVapRXG70hKQWCH0Rm YjO1/8gkU0rW6i3n65f+PYNUve90qK2eSmMjC5Vse7/Ck+53VWm+xaU9tjkKeSOgpkc4dO g7dFkSZWRdtBgH5Yws4pbNOz7z8zlzw= 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-506-J0qcl0tpM-u54uv9R1h8NA-1; Sun, 17 May 2020 23:17:27 -0400 X-MC-Unique: J0qcl0tpM-u54uv9R1h8NA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 202081800D42; Mon, 18 May 2020 03:17:26 +0000 (UTC) Received: from [10.72.13.232] (ovpn-13-232.pek2.redhat.com [10.72.13.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8E83397; Mon, 18 May 2020 03:17:19 +0000 (UTC) To: "Wang, Xiao W" , Maxime Coquelin , "Ye, Xiaolong" , "shahafs@mellanox.com" , "matan@mellanox.com" , "amorenoz@redhat.com" , "viacheslavo@mellanox.com" , "dev@dpdk.org" Cc: "lulu@redhat.com" , "Xu, Rosen" References: <20200514080218.1435344-1-maxime.coquelin@redhat.com> <20200514080218.1435344-4-maxime.coquelin@redhat.com> <5004de61-e6f7-a38f-0836-60bcd5c4523d@redhat.com> <8f47759f-e1d6-9847-0b71-7e5c6119a015@redhat.com> From: Jason Wang Message-ID: <67c9a735-21c4-e067-93cf-84c48629b4c3@redhat.com> Date: Mon, 18 May 2020 11:17:17 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 3/9] vdpa/ifc: add support to vDPA queue enable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2020/5/18 上午11:09, Wang, Xiao W wrote: > Hi, > > Comments inline. > > Best Regards, > Xiao > >> -----Original Message----- >> From: Jason Wang >> Sent: Friday, May 15, 2020 6:09 PM >> To: Wang, Xiao W; Maxime Coquelin >> ; Ye, Xiaolong; >> shahafs@mellanox.com;matan@mellanox.com;amorenoz@redhat.com; >> viacheslavo@mellanox.com;dev@dpdk.org >> Cc:lulu@redhat.com; Xu, Rosen >> Subject: Re: [PATCH 3/9] vdpa/ifc: add support to vDPA queue enable >> >> >> On 2020/5/15 下午5:42, Wang, Xiao W wrote: >>> Hi, >>> >>> Best Regards, >>> >>> Xiao >>> >>>> -----Original Message----- >>>> From: Jason Wang >>>> Sent: Friday, May 15, 2020 5:09 PM >>>> To: Maxime Coquelin; Ye, Xiaolong >>>> ;shahafs@mellanox.com;matan@mellanox.com; >>>> amorenoz@redhat.com; Wang, Xiao W; >>>> viacheslavo@mellanox.com;dev@dpdk.org >>>> Cc:lulu@redhat.com >>>> Subject: Re: [PATCH 3/9] vdpa/ifc: add support to vDPA queue enable >>>> On 2020/5/14 下午4:02, Maxime Coquelin wrote: >>>>> This patch adds support to enabling and disabling >>>>> vrings on a per-vring granularity. >>>>> Signed-off-by: Maxime Coquelin >> > >>> >>>> A question here, I see in qemu peer_attach() may try to generate >>>> VHOST_USER_SET_VRING_ENABLE, but just from the name I think it should >>>> behave as queue_enable defined in virtio specification which is >>>> explicitly under the control of guest? >>>> (Note, in Cindy's vDPA series, we must invent new vhost_ops to differ >>>> from this one). >>> From my view, common_cfg.enable reg is used for registering a queue to >>> hypervisor&vhost, but not ENABLE. >>> >> Well, what's your definition of "enable" in this context? > "Enable a queue" means traffic can pass through this queue. > >> Spec said: >> >> queue_enable >> The driver uses this to selectively prevent the device from >> executing requests from this virtqueue. 1 - enabled; 0 - disabled. >> >> This means, if queue_enable is not set to 1, device can not execute >> request for this specific virtqueue. >> > For queue enabling in virtio MQ case, there're 2 steps needed: > 1. select a queue and write 1 to common_cfg.enable reg Note that: 1) queue_enable doesn't mean you can disable a queue by writing zero to that (which is not allowed by the spec) 2) queue_enable is not specific to MQ, you need write 1 to all the queues that will be used by this driver 3) it's not allowed to write 1 to queue_enable after DRIVER_OK > 2. send control vq message VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET > If no step2, by default there's only 1 queue pair enabled. Yes, and if you read the git history. This command is invented by me :) Thanks >