mbox series

[v8,0/2] vhost: introduce DMA vchannel unconfiguration

Message ID 20221025082540.100618-1-xuan.ding@intel.com (mailing list archive)
Headers
Series vhost: introduce DMA vchannel unconfiguration |

Message

Ding, Xuan Oct. 25, 2022, 8:25 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.

v8:
* Check inflight packets release virtual channel.

v7:
* Add inflight packets processing.
* Fix CI error.

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    |  5 ++
 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                      | 72 ++++++++++++++++++++++++--
 6 files changed, 108 insertions(+), 5 deletions(-)
  

Comments

Chenbo Xia Oct. 26, 2022, 9:07 a.m. UTC | #1
> -----Original Message-----
> From: Ding, Xuan <xuan.ding@intel.com>
> Sent: Tuesday, October 25, 2022 4:26 PM
> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; He, Xingguang
> <xingguang.he@intel.com>; Ling, WeiX <weix.ling@intel.com>; Jiang, Cheng1
> <cheng1.jiang@intel.com>; Wang, YuanX <yuanx.wang@intel.com>; Ma, WenwuX
> <wenwux.ma@intel.com>; Ding, Xuan <xuan.ding@intel.com>
> Subject: [PATCH v8 0/2] vhost: introduce DMA vchannel unconfiguration
> 
> 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.
> 
> v8:
> * Check inflight packets release virtual channel.
> 
> v7:
> * Add inflight packets processing.
> * Fix CI error.
> 
> 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    |  5 ++
>  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                      | 72 ++++++++++++++++++++++++--
>  6 files changed, 108 insertions(+), 5 deletions(-)
> 
> --
> 2.17.1

Series applied to next-virtio/main, thanks