From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B70C42B9A; Thu, 25 May 2023 13:43:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B51B940DF8; Thu, 25 May 2023 13:43:34 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7A40F40DDB for ; Thu, 25 May 2023 13:43:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685015012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eOtLDZF1EaNrvQ9JfcaFANzlo1lOYjtIk+4It0Vyc4s=; b=hdTkpuDtmMT4fqkHDq7ikANO/RabVu0QimlNsjCqzkGLJs1QPQyhyIj6gfQ3ltIgvZ8bgx m7RYvGF/2uRkIUZ2ePhkBqG6DAMw/WLnlVVTBM+fB2kZDLF+7fp9yURE2AE8shtAazmCMv ZOwppXELJoM2yncyEvSXkbcJZAK+dhc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-301-V_n1HQRON-2kVXGcpfkujA-1; Thu, 25 May 2023 07:43:28 -0400 X-MC-Unique: V_n1HQRON-2kVXGcpfkujA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 39EC3381D4C3; Thu, 25 May 2023 11:43:28 +0000 (UTC) Received: from [10.39.208.23] (unknown [10.39.208.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 03F5948205E; Thu, 25 May 2023 11:43:25 +0000 (UTC) Message-ID: Date: Thu, 25 May 2023 13:43:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [RFC 25/27] vhost: add support for VDUSE IOTLB update event To: "Xia, Chenbo" , "dev@dpdk.org" , "david.marchand@redhat.com" , "mkp@redhat.com" , "fbl@redhat.com" , "jasowang@redhat.com" , "Liang, Cunming" , "Xie, Yongji" , "echaudro@redhat.com" , "eperezma@redhat.com" , "amorenoz@redhat.com" References: <20230331154259.1447831-1-maxime.coquelin@redhat.com> <20230331154259.1447831-26-maxime.coquelin@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 5/9/23 07:35, Xia, Chenbo wrote: > Hi Maxime, > >> -----Original Message----- >> From: Maxime Coquelin >> Sent: Friday, March 31, 2023 11:43 PM >> To: dev@dpdk.org; david.marchand@redhat.com; Xia, Chenbo >> ; mkp@redhat.com; fbl@redhat.com; >> jasowang@redhat.com; Liang, Cunming ; Xie, Yongji >> ; echaudro@redhat.com; eperezma@redhat.com; >> amorenoz@redhat.com >> Cc: Maxime Coquelin >> Subject: [RFC 25/27] vhost: add support for VDUSE IOTLB update event >> >> This patch adds support for VDUSE_UPDATE_IOTLB event >> handling, which consists in invaliding IOTLB entries for >> the range specified in the request. >> >> Signed-off-by: Maxime Coquelin >> --- >> lib/vhost/vduse.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c >> index 7d59a5f709..b5b9fa2eb1 100644 >> --- a/lib/vhost/vduse.c >> +++ b/lib/vhost/vduse.c >> @@ -169,6 +169,12 @@ vduse_events_handler(int fd, void *arg, int *remove >> __rte_unused) >> dev->status = req.s.status; >> resp.result = VDUSE_REQ_RESULT_OK; >> break; >> + case VDUSE_UPDATE_IOTLB: >> + VHOST_LOG_CONFIG(dev->ifname, INFO, "\tIOVA range: %" PRIx64 " >> - %" PRIx64 "\n", >> + (uint64_t)req.iova.start, (uint64_t)req.iova.last); >> + vhost_user_iotlb_cache_remove(dev, req.iova.start, >> + req.iova.last - req.iova.start + 1); >> + break; > > We don't need to set the response result here? Good catch! We indeed need to send the reply for this message. I'm fixing it now. Thanks, Maxime > Thanks, > Chenbo > >> default: >> resp.result = VDUSE_REQ_RESULT_FAILED; >> break; >> -- >> 2.39.2 >