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 368CCA04B7; Wed, 14 Oct 2020 11:28:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A1531DD74; Wed, 14 Oct 2020 11:28:28 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 1C4C01DA95 for ; Wed, 14 Oct 2020 11:28:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602667703; 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=IY4d4Nm25vrrl7B8zuX5nse14f4nu8N/DccIHcynQ9Y=; b=bBer7578/lfnotfnzC6R2owvbFr/2KXVBwjyssj56nzqGsB6MWkQJ5dlp6CeX1tsrzkOPd BD02YWeFh4aQYxvXJooLl8Vg/+zU1qvakZOKUFIHjc915Usu3QHQ7GS6AAaPraymCUOgls iPrvFeYfzzyBhxXweRAa9HzyoM8nimQ= 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-361-XkxHRdDuONCDsFreu6-OnQ-1; Wed, 14 Oct 2020 05:28:22 -0400 X-MC-Unique: XkxHRdDuONCDsFreu6-OnQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A56E418A072B; Wed, 14 Oct 2020 09:28:20 +0000 (UTC) Received: from [10.36.110.38] (unknown [10.36.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 776F67512E; Wed, 14 Oct 2020 09:28:19 +0000 (UTC) To: Patrick Fu , dev@dpdk.org, chenbo.xia@intel.com Cc: zhihong.wang@intel.com, cheng1.jiang@intel.com References: <20200911015316.1903181-1-patrick.fu@intel.com> <20201013014546.2896162-1-patrick.fu@intel.com> <20201013014546.2896162-2-patrick.fu@intel.com> From: Maxime Coquelin Message-ID: <101c1629-737c-fe98-7099-719dd3d6742a@redhat.com> Date: Wed, 14 Oct 2020 11:28:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201013014546.2896162-2-patrick.fu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 1/4] vhost: simplify async copy completion 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 10/13/20 3:45 AM, Patrick Fu wrote: > Current async ops allows check_completed_copies() callback to return > arbitrary number of async iov segments finished from backend async > devices. This design creates complexity for vhost to handle breaking > transfer of a single packet (i.e. transfer completes in the middle > of a async descriptor) and prevents application callbacks from > leveraging hardware capability to offload the work. Thus, this patch > enforces the check_completed_copies() callback to return the number > of async memory descriptors, which is aligned with async transfer > data ops callbacks. vHost async data path are revised to work with > new ops define, which provides a clean and simplified processing. > > Signed-off-by: Patrick Fu > --- > lib/librte_vhost/rte_vhost_async.h | 15 ++- > lib/librte_vhost/vhost.c | 20 ++-- > lib/librte_vhost/vhost.h | 8 +- > lib/librte_vhost/vhost_user.c | 6 +- > lib/librte_vhost/virtio_net.c | 149 ++++++++++++----------------- > 5 files changed, 88 insertions(+), 110 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime