From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6589C433E6 for ; Wed, 17 Mar 2021 06:26:54 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 6A44664F6B for ; Wed, 17 Mar 2021 06:26:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A44664F6B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80B53242B15; Wed, 17 Mar 2021 07:26:34 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 43945242B0D for ; Wed, 17 Mar 2021 07:26:32 +0100 (CET) IronPort-SDR: BnmVzIQLlPSykS9G0Jgadk23u4F4m54Vk3CZ/lp+I9qWmuvdrQaCVf2alFCb0KsyAydBrdwtLF eiGblIbVcW7A== X-IronPort-AV: E=McAfee;i="6000,8403,9925"; a="186041220" X-IronPort-AV: E=Sophos;i="5.81,255,1610438400"; d="scan'208";a="186041220" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 23:26:31 -0700 IronPort-SDR: CifljjufdVE212hhEsIKQ0h2tjLKdcff5BRRLGakQ0yRc2jhc51mMVx3YU3LBUHl2BcPzCHKaB 4XY4ofZeNLfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,255,1610438400"; d="scan'208";a="433282934" Received: from npg_dpdk_virtio_jiayuhu_07.sh.intel.com ([10.67.118.193]) by fmsmga004.fm.intel.com with ESMTP; 16 Mar 2021 23:26:30 -0700 From: Jiayu Hu To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, chenbo.xia@intel.com, yinan.wang@intel.com, cheng1.jiang@intel.com, sunil.pai.g@intel.com, Jiayu Hu Date: Wed, 17 Mar 2021 08:56:13 -0400 Message-Id: <1615985773-406787-5-git-send-email-jiayu.hu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615985773-406787-1-git-send-email-jiayu.hu@intel.com> References: <1615985773-406787-1-git-send-email-jiayu.hu@intel.com> Subject: [dpdk-dev] [PATCH 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" Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index dc29229..333bd0a 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,13 @@ 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. + + To guarantee correct behaviors, users must unregister async + copy devices for all vhost queues, when virtio device is paused + or shut down. Note that this API tries to acquire the spinlock + of vhost queue, so users need stop polling thread before unregister. * ``rte_vhost_submit_enqueue_burst(vid, queue_id, pkts, count, comp_pkts, comp_count)`` -- 2.7.4