mbox series

[0/4] Add external contiguous memory support to Virtio-user

Message ID 20191213141322.32730-1-maxime.coquelin@redhat.com (mailing list archive)
Headers
Series Add external contiguous memory support to Virtio-user |

Message

Maxime Coquelin Dec. 13, 2019, 2:13 p.m. UTC
  Somme applications/frameworks using DPDK allocate their own memory
for its buffers. This is the case of Seastar, and also VPP.

It is currently not possible to use Virtio-user PMD with these
applications because Virtio-user requires file descriptor for this
memory to be shared with the vhost-user backend (vDPA in our case [0]).

This series introduces a new API in EAL to register external memory
that is contiguous in both the VA and the IOVA space.

It also enables VDEVs to implement the DMA map/unmap callback, and
implement it in Virtio-user PMD.

Please note that extmem unit tests are missing. I'm working on it
and it will be in v2. Just share this v1 for early reviews.

Maxime Coquelin (4):
  eal: add new API to register contiguous external memory
  eal: allow getting memory segment FD with external memory
  bus/vdev: add DMA mapping supprt
  net/virtio: add DMA mapping callback to virtio-user

 drivers/bus/vdev/rte_bus_vdev.h               | 24 +++++
 drivers/bus/vdev/vdev.c                       | 50 +++++++++++
 .../net/virtio/virtio_user/virtio_user_dev.c  | 10 +--
 .../net/virtio/virtio_user/virtio_user_dev.h  |  3 +
 drivers/net/virtio/virtio_user_ethdev.c       | 58 +++++++++++++
 lib/librte_eal/common/eal_common_memory.c     | 87 ++++++++++++++++---
 lib/librte_eal/common/include/rte_memory.h    | 46 ++++++++++
 lib/librte_eal/common/malloc_heap.c           | 17 +++-
 lib/librte_eal/common/malloc_heap.h           |  2 +-
 lib/librte_eal/common/rte_malloc.c            |  2 +-
 lib/librte_eal/rte_eal_version.map            |  3 +
 11 files changed, 278 insertions(+), 24 deletions(-)
  

Comments

Maxime Coquelin Jan. 8, 2020, 4:11 p.m. UTC | #1
Hi Anatoly,

Any feedback on the series?
This is important for vDPA support, to be compliant with containeriez
application using external memory.

Thanks,
Maxime

On 12/13/19 3:13 PM, Maxime Coquelin wrote:
> Somme applications/frameworks using DPDK allocate their own memory
> for its buffers. This is the case of Seastar, and also VPP.
> 
> It is currently not possible to use Virtio-user PMD with these
> applications because Virtio-user requires file descriptor for this
> memory to be shared with the vhost-user backend (vDPA in our case [0]).
> 
> This series introduces a new API in EAL to register external memory
> that is contiguous in both the VA and the IOVA space.
> 
> It also enables VDEVs to implement the DMA map/unmap callback, and
> implement it in Virtio-user PMD.
> 
> Please note that extmem unit tests are missing. I'm working on it
> and it will be in v2. Just share this v1 for early reviews.
> 
> Maxime Coquelin (4):
>   eal: add new API to register contiguous external memory
>   eal: allow getting memory segment FD with external memory
>   bus/vdev: add DMA mapping supprt
>   net/virtio: add DMA mapping callback to virtio-user
> 
>  drivers/bus/vdev/rte_bus_vdev.h               | 24 +++++
>  drivers/bus/vdev/vdev.c                       | 50 +++++++++++
>  .../net/virtio/virtio_user/virtio_user_dev.c  | 10 +--
>  .../net/virtio/virtio_user/virtio_user_dev.h  |  3 +
>  drivers/net/virtio/virtio_user_ethdev.c       | 58 +++++++++++++
>  lib/librte_eal/common/eal_common_memory.c     | 87 ++++++++++++++++---
>  lib/librte_eal/common/include/rte_memory.h    | 46 ++++++++++
>  lib/librte_eal/common/malloc_heap.c           | 17 +++-
>  lib/librte_eal/common/malloc_heap.h           |  2 +-
>  lib/librte_eal/common/rte_malloc.c            |  2 +-
>  lib/librte_eal/rte_eal_version.map            |  3 +
>  11 files changed, 278 insertions(+), 24 deletions(-)
>