[v6,0/2] vhost: introduce DMA vchannel unconfiguration
Message ID | 20221018152221.86341-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 A9470A0560; Tue, 18 Oct 2022 17:25:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4912340395; Tue, 18 Oct 2022 17:25:16 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 97BD74021D for <dev@dpdk.org>; Tue, 18 Oct 2022 17:25:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666106714; x=1697642714; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=944a2gHrqI/+sGwZplkpH1gaaXhYDU5D36robSAAkj4=; b=OZrx/Q2WowBZOgNRd7gfCSJKi9xD6PKsR2GKbznsoQ7QzSOSiOST94FE I1ABx2d6VsErVtG3w0YROF5ijj/OJVoawjIp+NXUXMB3X7DTdePi1ORXc nrc9vApSSwV5tAecFqe2RMUq9Fyhf/k/nMb7Nn0NtWnPZ8rwJUSwTu1Qs K040y/gtpb4PJLaZVjlIJPbrtts5i7ny4yGtrjwkD/LitmsbO9G6UF7ky +b7qQZEGhzGGBFEkOIYxaISGx/j9MQ7tA9D2f76ZRCETANnqx3XxSPUCF 0fNgMtXoThplhDmNiH8zHaiAPKrd0be3OyOryG0uYwC7CWObMoNiDdK/T Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="392444766" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="392444766" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2022 08:25:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="733686000" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="733686000" Received: from npg-dpdk-xuan-cbdma.sh.intel.com ([10.67.111.102]) by fmsmga002.fm.intel.com with ESMTP; 18 Oct 2022 08:25:11 -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 v6 0/2] vhost: introduce DMA vchannel unconfiguration Date: Tue, 18 Oct 2022 15:22:19 +0000 Message-Id: <20221018152221.86341-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. 18, 2022, 3:22 p.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.
v6:
* Move DMA unconfiguration to the end due to DMA devices maybe reused
after destroy_device().
* Refine the doc to claim the DMA device should not be used in vhost
after unconfiguration.
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 | 7 +++
doc/guides/rel_notes/release_22_11.rst | 5 ++
examples/vhost/main.c | 8 +++
lib/vhost/rte_vhost_async.h | 20 ++++++++
lib/vhost/version.map | 3 ++
lib/vhost/vhost.c | 69 ++++++++++++++++++++++++--
6 files changed, 107 insertions(+), 5 deletions(-)