From patchwork Tue Sep 28 15:55:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ding, Xuan" X-Patchwork-Id: 99933 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EAE15A0C41; Tue, 28 Sep 2021 18:05:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7662B410D7; Tue, 28 Sep 2021 18:05:36 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id E089D40E3C for ; Tue, 28 Sep 2021 18:05:34 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10121"; a="288400241" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="288400241" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 09:03:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="519097235" Received: from dpdk-xuanding-dev2.sh.intel.com ([10.67.119.250]) by fmsmga008.fm.intel.com with ESMTP; 28 Sep 2021 09:03:01 -0700 From: Xuan Ding To: dev@dpdk.org, maxime.coquelin@redhat.com, chenbo.xia@intel.com, ktraynor@redhat.com Cc: jiayu.hu@intel.com, cheng1.jiang@intel.com, bruce.richardson@intel.com, sunil.pai.g@intel.com, yinan.wang@intel.com, YvonneX.Yang@intel.com, Xuan Ding Date: Tue, 28 Sep 2021 15:55:07 +0000 Message-Id: <20210928155509.73762-1-xuan.ding@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210909055758.106588-1-xuan.ding@intel.com> References: <20210909055758.106588-1-xuan.ding@intel.com> Subject: [dpdk-dev] [PATCH v6 0/2] add unsafe API to get inflight 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" This patchset introduces an unsafe API to get the number of inflight packets in DMA engine in some situations. Like vring state changes or device is destroyed. Compared with rte_vhost_async_get_inflight(), this is a lock free version. v6: * Fixed an issue of infinite loop. v5: * Rebased to the lastest branch. v4: * Added use case for API in vhost example. v3: * Fixed one typo. * Revised the doc to be more accuracy. v2: * Fixed some format issues. Xuan Ding (2): vhost: add unsafe API to check inflight packets examples/vhost: use API to check inflight packets doc/guides/prog_guide/vhost_lib.rst | 5 +++++ doc/guides/rel_notes/release_21_11.rst | 5 +++++ examples/vhost/main.c | 31 ++++++++++++++------------ examples/vhost/main.h | 1 - lib/vhost/rte_vhost_async.h | 14 ++++++++++++ lib/vhost/version.map | 3 +++ lib/vhost/vhost.c | 26 +++++++++++++++++++++ 7 files changed, 70 insertions(+), 15 deletions(-)