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 0E002A0579; Tue, 20 Apr 2021 11:31:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CCA141529; Tue, 20 Apr 2021 11:31:56 +0200 (CEST) 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 402D0411A5 for ; Tue, 20 Apr 2021 11:31:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618911114; 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=ZA3QY8BDuwO0MQS/s1bf7jgbUY4v3MnwQPQVg7tjzDY=; b=RP7kjmcRNbRkufpGGD3ogXxwivTl2ED64WdDPrC28t6P7sJoX70tnF/HBTs0bw5k50H9PD bwL0vBX+pq2LI9JU65VeRloXYRPcaNgufUrogavXNfgPPKsqD7rJfQHdHuj0gt48VT9f4k ImpgznxcIHit8Ns6QR2hpjR4EUXW0Pw= 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-554-ge9rpgLPPKm0VARoEjnoxA-1; Tue, 20 Apr 2021 05:31:50 -0400 X-MC-Unique: ge9rpgLPPKm0VARoEjnoxA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5EFE107ACCA; Tue, 20 Apr 2021 09:31:49 +0000 (UTC) Received: from [10.36.110.28] (unknown [10.36.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 759FE1007604; Tue, 20 Apr 2021 09:31:48 +0000 (UTC) To: Jiayu Hu , dev@dpdk.org Cc: chenbo.xia@intel.com, yinan.wang@intel.com, sunil.pai.g@intel.com, cheng1.jiang@intel.com References: <1617368642-131298-1-git-send-email-jiayu.hu@intel.com> <1618909066-114980-1-git-send-email-jiayu.hu@intel.com> <1618909066-114980-5-git-send-email-jiayu.hu@intel.com> From: Maxime Coquelin Message-ID: Date: Tue, 20 Apr 2021 11:31:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <1618909066-114980-5-git-send-email-jiayu.hu@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 4/4] doc: update async vhost register/unregister 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 4/20/21 10:57 AM, Jiayu Hu wrote: > This patch is to update programmer guide for register/unregister > copy devices in vhost. > > Signed-off-by: Jiayu Hu > --- > doc/guides/prog_guide/vhost_lib.rst | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst > index dc29229..7afa351 100644 > --- a/doc/guides/prog_guide/vhost_lib.rst > +++ b/doc/guides/prog_guide/vhost_lib.rst > @@ -208,9 +208,9 @@ The following is an overview of some key Vhost API functions: > > * ``rte_vhost_async_channel_register(vid, queue_id, features, ops)`` > > - Register a vhost queue with async copy device channel. > - Following device ``features`` must be specified together with the > - registration: > + Register a vhost queue with async copy device channel after vring > + is enabled. Following device ``features`` must be specified together > + with the registration: > > * ``async_inorder`` > > @@ -244,6 +244,14 @@ The following is an overview of some key Vhost API functions: > * ``rte_vhost_async_channel_unregister(vid, queue_id)`` > > Unregister the async copy device channel from a vhost queue. > + Unregistration will fail, if the vhost queue has in-flight > + packets that are not completed. > + > + Unregister async copy devices in vring_state_changed() may > + fail, as this API tries to acquire the spinlock of vhost > + queue. The recommended way is to unregister async copy > + devices for all vhost queues in destroy_device(), when a > + virtio device is paused or shut down. > > * ``rte_vhost_submit_enqueue_burst(vid, queue_id, pkts, count, comp_pkts, comp_count)`` > > Reviewed-by: Maxime Coquelin Thanks, Maxime