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 A4336A0501; Thu, 5 May 2022 21:52:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A7494014F; Thu, 5 May 2022 21:52:49 +0200 (CEST) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.133.74]) by mails.dpdk.org (Postfix) with ESMTP id 7D3E040042 for ; Thu, 5 May 2022 21:52:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651780366; 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=EYkg+1/aKesPVD/ok1Z3Fdu+KHFslwWHZ2wXRj9AhHA=; b=YbTZYuKI3jDgy/s3j7M/QRgZB7aVjMs+AjGADuTaYbqXDOspX0wDfAq/8oUYMvN4758Dnn jHO1vMyQU4sQ5+/8Tl3n7phhAodMCm5h+LI0DjlHPI8iaOoo/FnwMSpfQkESwibeoObDWH MZJvyM0Wz+UpT3YbQckXZT3RywyevjE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-670-aIgv_4uKO9Wqz4CnpelC2g-1; Thu, 05 May 2022 15:52:41 -0400 X-MC-Unique: aIgv_4uKO9Wqz4CnpelC2g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E5237185A794; Thu, 5 May 2022 19:52:40 +0000 (UTC) Received: from [10.39.208.18] (unknown [10.39.208.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9B1AE2166B17; Thu, 5 May 2022 19:52:39 +0000 (UTC) Message-ID: Date: Thu, 5 May 2022 21:52:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH v4 0/5] vhost: support async dequeue data path To: xuan.ding@intel.com, chenbo.xia@intel.com Cc: dev@dpdk.org, jiayu.hu@intel.com, cheng1.jiang@intel.com, sunil.pai.g@intel.com, liangma@liangbit.com References: <20220407152546.38167-1-xuan.ding@intel.com> <20220505062335.25445-1-xuan.ding@intel.com> From: Maxime Coquelin In-Reply-To: <20220505062335.25445-1-xuan.ding@intel.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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-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 Hi Xuan, On 5/5/22 08:23, xuan.ding@intel.com wrote: > From: Xuan Ding > > The presence of asynchronous path allows applications to offload memory > copies to DMA engine, so as to save CPU cycles and improve the copy > performance. This patch set implements vhost async dequeue data path > for split ring. The code is based on latest enqueue changes [1]. > > This patch set is a new design and implementation of [2]. Since dmadev > was introduced in DPDK 21.11, to simplify application logics, this patch > integrates dmadev in vhost. With dmadev integrated, vhost supports M:N > mapping between vrings and DMA virtual channels. Specifically, one vring > can use multiple different DMA channels and one DMA channel can be > shared by multiple vrings at the same time. > > A new asynchronous dequeue function is introduced: > 1) rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id, > struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, > uint16_t count, int *nr_inflight, > uint16_t dma_id, uint16_t vchan_id) > > Receive packets from the guest and offloads copies to DMA > virtual channel. > > [1] https://mails.dpdk.org/archives/dev/2022-February/234555.html > [2] https://mails.dpdk.org/archives/dev/2021-September/218591.html > > v3->v4: > * fix CI build warnings > * adjust some indentation > * pass vq instead of queue_id > > v2->v3: > * fix mbuf not updated correctly for large packets > > v1->v2: > * fix a typo > * fix a bug in desc_to_mbuf filling > > RFC v3 -> v1: > * add sync and async path descriptor to mbuf refactoring > * add API description in docs > > RFC v2 -> RFC v3: > * rebase to latest DPDK version > > RFC v1 -> RFC v2: > * fix one bug in example > * rename vchan to vchan_id > * check if dma_id and vchan_id valid > * rework all the logs to new standard > > Xuan Ding (5): > vhost: prepare sync for descriptor to mbuf refactoring > vhost: prepare async for descriptor to mbuf refactoring > vhost: merge sync and async descriptor to mbuf filling > vhost: support async dequeue for split ring > examples/vhost: support async dequeue data path > > doc/guides/prog_guide/vhost_lib.rst | 7 + > doc/guides/rel_notes/release_22_07.rst | 4 + > doc/guides/sample_app_ug/vhost.rst | 9 +- > examples/vhost/main.c | 292 +++++++++++----- > examples/vhost/main.h | 35 +- > examples/vhost/virtio_net.c | 16 +- > lib/vhost/rte_vhost_async.h | 33 ++ > lib/vhost/version.map | 3 + > lib/vhost/vhost.h | 1 + > lib/vhost/virtio_net.c | 467 ++++++++++++++++++++++--- > 10 files changed, 716 insertions(+), 151 deletions(-) > I applied your other series about unsafe API to get DMA inflight packets, so I have some conflicts when applying this series. Could you please rebase on top of next-virtio/main branch and repost? Thanks in avance, Maxime