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 865FCA04B5; Mon, 11 Jan 2021 13:45:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D21F140CC1; Mon, 11 Jan 2021 13:45:02 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 6BDA9140CB5 for ; Mon, 11 Jan 2021 13:45:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610369099; 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=OY7wOhRRoh+egOU/cmE7TifMK80p4TUHdsmSy+iXBdk=; b=dQGmnSltH244gMJvOH728OVO3lmDInSM/YaFbshw+idww69/4F4BamPhJSHYb2RCC5347X VhBFRQuYF5zWX9PAmaXqIk6AIUGhgfReoXJYeYZq1AgHaSgCp3M33nmUMQ5UGOOpfyRbvL N0opWv0SsjiziGlC5VyKT6nqo0F+h8k= 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-4-t8RjN8CeOPG3yMtm_7ReFg-1; Mon, 11 Jan 2021 07:44:58 -0500 X-MC-Unique: t8RjN8CeOPG3yMtm_7ReFg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D62E1190A7A0; Mon, 11 Jan 2021 12:44:56 +0000 (UTC) Received: from [10.36.110.24] (unknown [10.36.110.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A23705D9F4; Mon, 11 Jan 2021 12:44:55 +0000 (UTC) To: Jiayu Hu , dev@dpdk.org Cc: chenbo.xia@intel.com, cheng1.jiang@intel.com, yinan.wang@intel.com References: <1608884934-106977-1-git-send-email-jiayu.hu@intel.com> <1610367387-117188-1-git-send-email-jiayu.hu@intel.com> <1610367387-117188-3-git-send-email-jiayu.hu@intel.com> From: Maxime Coquelin Message-ID: <5f1a3dd9-4339-d464-931e-84121f887250@redhat.com> Date: Mon, 11 Jan 2021 13:44:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <1610367387-117188-3-git-send-email-jiayu.hu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 2/2] vhost: enhance async enqueue for small packets 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 Sender: "dev" On 1/11/21 1:16 PM, Jiayu Hu wrote: > Async enqueue offloads large copies to DMA devices, and small copies > are still performed by the CPU. However, it requires users to get > enqueue completed packets by rte_vhost_poll_enqueue_completed(), even > if they are completed by the CPU when rte_vhost_submit_enqueue_burst() > returns. This design incurs extra overheads of tracking completed > pktmbufs and function calls, thus degrading performance on small packets. > > This patch enhances async enqueue for small packets by enabling > rte_vhost_submit_enqueue_burst() to return completed packets. > > Signed-off-by: Jiayu Hu > Tested-by: Yinan Wang > --- > doc/guides/prog_guide/vhost_lib.rst | 8 +- > examples/vhost/main.c | 18 ++- > lib/librte_vhost/rte_vhost_async.h | 30 +++-- > lib/librte_vhost/vhost.c | 14 +-- > lib/librte_vhost/vhost.h | 7 +- > lib/librte_vhost/vhost_user.c | 7 +- > lib/librte_vhost/virtio_net.c | 242 ++++++++++++++++++++---------------- > 7 files changed, 190 insertions(+), 136 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime