From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A6B04A0524; Thu, 7 Jan 2021 11:45:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8CE5D140F3C; Thu, 7 Jan 2021 11:45:47 +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 36173140E81 for ; Thu, 7 Jan 2021 11:45:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610016345; 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=6q/mG1Bz+InidS4wfaU8XO2+aUq1o23EQott1NWWQhk=; b=Hdg0q+VuTq53vxjmkaEXjMFyHtbV+dpwVnkGsPT2Sp1nyMCA1bRbRSlS4p3nsJkBq+1NkQ itw7BJTQw59M198TDv/bXkn++f6gSbnlXMYjVXesGYCEtwZR67jTZoSovVyXuyeq4/8E6K z7s2T1XowK/05g3QtVx0rB3ATkL2Deo= 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-203-FZTwJcuaNNSTbXyR0AEUYQ-1; Thu, 07 Jan 2021 05:45:41 -0500 X-MC-Unique: FZTwJcuaNNSTbXyR0AEUYQ-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 8B6AD8018A7; Thu, 7 Jan 2021 10:45:40 +0000 (UTC) Received: from [10.36.110.9] (unknown [10.36.110.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A48CF5B6A2; Thu, 7 Jan 2021 10:45:38 +0000 (UTC) To: Jiayu Hu , dev@dpdk.org Cc: chenbo.xia@intel.com, cheng1.jiang@intel.com, yinan.wang@intel.com References: <1608630365-131192-1-git-send-email-jiayu.hu@intel.com> <1608884934-106977-1-git-send-email-jiayu.hu@intel.com> From: Maxime Coquelin Message-ID: <83a3cf8b-585d-be7c-c180-96a9b9628a89@redhat.com> Date: Thu, 7 Jan 2021 11:45:36 +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: <1608884934-106977-1-git-send-email-jiayu.hu@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 v3 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 12/25/20 9:28 AM, 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 > ========== > 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 +- > lib/librte_vhost/rte_vhost_async.h | 32 +++-- > 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 ++++++++++++++++++++---------------- > 6 files changed, 185 insertions(+), 141 deletions(-) > CI reports build failure with your series, because API changes are not done in the examples: FAILED: examples/dpdk-vhost.p/vhost_main.c.o cc -Iexamples/dpdk-vhost.p -Iexamples -I../examples -Iexamples/vhost -I../examples/vhost -I. -I.. -Iconfig -I../config -Ilib/librte_eal/include -I../lib/librte_eal/include -Ilib/librte_eal/linux/include -I../lib/librte_eal/linux/include -Ilib/librte_eal/x86/include -I../lib/librte_eal/x86/include -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_metrics -I../lib/librte_metrics -Ilib/librte_telemetry -I../lib/librte_telemetry -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring -I../lib/librte_ring -Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_ethdev -I../lib/librte_ethdev -Ilib/librte_meter -I../lib/librte_meter -Ilib/librte_cmdline -I../lib/librte_cmdline -Ilib/librte_vhost -I../lib/librte_vhost -Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_hash -I../lib/librte_hash -Ilib/librte_rcu -I../lib/librte_rcu -Ilib/librte_pci -I../lib/librte_pci -Idrivers/raw/ioat -I../drivers/raw/ioat -Ilib/librte_rawdev -I../lib/librte_rawdev -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Idrivers/bus/vdev -I../drivers/bus/vdev -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O3 -include rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-missing-field-initializers -D_GNU_SOURCE -march=native -Wno-format-truncation -DALLOW_EXPERIMENTAL_API -MD -MQ examples/dpdk-vhost.p/vhost_main.c.o -MF examples/dpdk-vhost.p/vhost_main.c.o.d -o examples/dpdk-vhost.p/vhost_main.c.o -c ../examples/vhost/main.c ../examples/vhost/main.c: In function 'virtio_xmit': ../examples/vhost/main.c:817:9: error: too few arguments to function 'rte_vhost_submit_enqueue_burst' ret = rte_vhost_submit_enqueue_burst(dst_vdev->vid, VIRTIO_RXQ, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../examples/vhost/ioat.h:10:0, from ../examples/vhost/main.c:28: ../lib/librte_vhost/rte_vhost_async.h:171:10: note: declared here uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../examples/vhost/main.c: In function 'drain_eth_rx': ../examples/vhost/main.c:1126:19: error: too few arguments to function 'rte_vhost_submit_enqueue_burst' enqueue_count = rte_vhost_submit_enqueue_burst(vdev->vid, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../examples/vhost/ioat.h:10:0, from ../examples/vhost/main.c:28: ../lib/librte_vhost/rte_vhost_async.h:171:10: note: declared here uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~