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 5DDCFA09FF; Mon, 11 Jan 2021 16:02:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A9CA140EEB; Mon, 11 Jan 2021 16:02:48 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id D7666140EE4 for ; Mon, 11 Jan 2021 16:02:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610377366; 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=FJBJtTEFGtU+e6DVKjw3qdnWxvQyaDTmhsl8G76lDeM=; b=e3Zfo8LzIlT/Uuifsn0IDNjLy9u4l4/CSklq6Y3Mx11yjrbr17fX86ld2/B8DtvWRk3xVZ l5V44weFeSsP1JpWknVdNnuobkWxA4fkNJducdzL3szsOq5iJvIfr75AJxGoP4nhwNEH5H TuKkR4eyi+ko6IA4cBKRAiOCK6niqks= 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-367-6H9eAesIPpaKU7WKtnuwhw-1; Mon, 11 Jan 2021 10:02:42 -0500 X-MC-Unique: 6H9eAesIPpaKU7WKtnuwhw-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 59D27801A03; Mon, 11 Jan 2021 15:02:35 +0000 (UTC) Received: from [10.36.110.24] (unknown [10.36.110.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 21BA019C59; Mon, 11 Jan 2021 15:02:33 +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> From: Maxime Coquelin Message-ID: Date: Mon, 11 Jan 2021 16:02:32 +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-1-git-send-email-jiayu.hu@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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 0/2] 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. > > The first patch cleans up async enqueue code, and the second patch > enables rte_vhost_submit_enqueue_burst() to return completed packets. > > Change log > ========== > v4: > - support new API in vhost example > v3: > - fix incorrect ret value when DMA ring is full > - enhance description of API declaration and programmer guide > v2: > - fix typo > - rename API variables > - update programmer guide > > Jiayu Hu (2): > vhost: cleanup async enqueue > vhost: enhance async enqueue for small packets > > doc/guides/prog_guide/vhost_lib.rst | 8 +- > examples/vhost/main.c | 18 ++- > lib/librte_vhost/rte_vhost_async.h | 34 +++-- > 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 | 258 ++++++++++++++++++++---------------- > 7 files changed, 200 insertions(+), 146 deletions(-) > Applied to dpdk-next-virtio/main. Thanks, Maxime