[v5,0/2] vhost: introduce DMA vchannel unconfiguration
Message ID | 20221013092708.4922-1-xuan.ding@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> 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 BA090A00C2; Thu, 13 Oct 2022 11:29:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D3A2410F2; Thu, 13 Oct 2022 11:29:24 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id C436B40C35 for <dev@dpdk.org>; Thu, 13 Oct 2022 11:29:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665653362; x=1697189362; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=SF1JlOcBZX6oIoKWO3m2LnrdTgHGdp8Gtugq9qQ134w=; b=BBmwfmoI4WSWL0vPukKE3NHbjnx2r+oCOwzut7lWtwcLECT7J4LvDTZZ RzSl9MFjRVh06cN/M/gmBgWQq4ji+6mXM3LIYXgFrZTNhdIfi0Yv9uNGW ksfHfsPFEGBYOG97ngIfgwFTgqerAJU2QKB80GcaZxpQ6i8R9Wowc9uk+ pduKPyuNjyGT+ZKA1jZXPHtAearnfI9Pt6E8l0vt7B73+IP8FVFRLWDtZ RnEUSX98yGUr36HJfupRg63lo2IDnwxXFNoE0TgptnrizQep2O5Vm92uv RL4J4njVO3tKxDfloocCozRv75QZjPRYjcyIcj9K17YlmJvmRHjNqt8v3 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="305022253" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="305022253" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2022 02:29:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="769547363" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="769547363" Received: from npg-dpdk-xuan-cbdma.sh.intel.com ([10.67.111.102]) by fmsmga001.fm.intel.com with ESMTP; 13 Oct 2022 02:29:19 -0700 From: xuan.ding@intel.com To: maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: dev@dpdk.org, jiayu.hu@intel.com, xingguang.he@intel.com, yvonnex.yang@intel.com, cheng1.jiang@intel.com, yuanx.wang@intel.com, wenwux.ma@intel.com, Xuan Ding <xuan.ding@intel.com> Subject: [PATCH v5 0/2] vhost: introduce DMA vchannel unconfiguration Date: Thu, 13 Oct 2022 09:27:06 +0000 Message-Id: <20221013092708.4922-1-xuan.ding@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220814140442.82525-1-xuan.ding@intel.com> References: <20220814140442.82525-1-xuan.ding@intel.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Message
Ding, Xuan
Oct. 13, 2022, 9:27 a.m. UTC
From: Xuan Ding <xuan.ding@intel.com>
This patchset introduces a new API rte_vhost_async_dma_unconfigure()
to help user to manually free DMA vchannels finished to use.
Note: this API should be called after async channel unregister.
v5:
* Use mutex instead of spinlock.
* Improve code readability.
v4:
* Rebase to 22.11 rc1.
* Fix the usage of 'dma_ref_count' to make sure the specified DMA device
is not used by any vhost ports before unconfiguration.
v3:
* Rebase to latest DPDK.
* Refine some descriptions in the doc.
* Fix one bug in the vhost example.
v2:
* Add spinlock protection.
* Fix a memory leak issue.
* Refine the doc.
Xuan Ding (2):
vhost: introduce DMA vchannel unconfiguration
examples/vhost: unconfigure DMA vchannel
doc/guides/prog_guide/vhost_lib.rst | 6 +++
doc/guides/rel_notes/release_22_11.rst | 4 ++
examples/vhost/main.c | 40 ++++++++++-----
lib/vhost/rte_vhost_async.h | 18 +++++++
lib/vhost/version.map | 3 ++
lib/vhost/vhost.c | 69 ++++++++++++++++++++++++--
6 files changed, 122 insertions(+), 18 deletions(-)