[dpdk-dev] [PATCH] gpudev: introduce memory API

Thomas Monjalon thomas at monjalon.net
Mon Jun 7 12:43:42 CEST 2021


07/06/2021 09:20, Wang, Haiyue:
> From: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>
> > If we keep CXL in mind, I would imagine that in the future the devices on PCIe could have their own
> > local memory. May be some of the APIs could use generic names. For ex: instead of calling it as
> > "rte_gpu_malloc" may be we could call it as "rte_dev_malloc". This way any future device which hosts
> > its own memory that need to be managed by the application, can use these APIs.
> > 
> 
> "rte_dev_malloc" sounds a good name,

Yes I like the idea.
2 concerns:

1/ Device memory allocation requires a device handle.
So far we avoided exposing rte_device to the application.
How should we get a device handle from a DPDK application?

2/ Implementation must be done in a driver.
Should it be a callback defined at rte_device level?

> then looks like we need to enhance the
> 'struct rte_device' with some new ops as:
> 
> eal: move DMA mapping from bus-specific to generic driver
> 
> https://patchwork.dpdk.org/project/dpdk/patch/20210331224547.2217759-1-thomas@monjalon.net/

Not sure the above patch is a good idea.
Let's discuss this DMA detail later :)





More information about the dev mailing list