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 22D8CA0547; Tue, 20 Apr 2021 04:29:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C719415B5; Tue, 20 Apr 2021 04:28:52 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 288FA415AC for ; Tue, 20 Apr 2021 04:28:46 +0200 (CEST) IronPort-SDR: n+4rqf9B/V2ady6e/j5Z0pH5L2QCbkn39cEtoh7jYGZEus9fuOrF6OnKxwEpTe/6zm2XRNRAm4 fpPeKUxTYWyA== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="256741041" X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="256741041" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 19:28:45 -0700 IronPort-SDR: swDUt1XADf9srBLTxLc6DwqGtvgkZrC/Ak/RrDOSh3JWAajOqBedhjIV09PMozEogaAtRwTSc/ BfT+Bpc8IKLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="426739893" Received: from npg_dpdk_virtio_jiayuhu_07.sh.intel.com ([10.67.118.193]) by orsmga008.jf.intel.com with ESMTP; 19 Apr 2021 19:28:43 -0700 From: Jiayu Hu To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, chenbo.xia@intel.com, yinan.wang@intel.com, sunil.pai.g@intel.com, cheng1.jiang@intel.com, jiayu.hu@intel.com Date: Tue, 20 Apr 2021 04:57:46 -0400 Message-Id: <1618909066-114980-5-git-send-email-jiayu.hu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618909066-114980-1-git-send-email-jiayu.hu@intel.com> References: <1617368642-131298-1-git-send-email-jiayu.hu@intel.com> <1618909066-114980-1-git-send-email-jiayu.hu@intel.com> Subject: [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" 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)`` -- 2.7.4