[RFC,UPDATE,1/9] dmadev: add missing exports
Checks
Commit Message
Export the rte_dmadevices array and the allocate and release functions
which are needed by PMDs.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/meson.build | 1 +
lib/dmadev/rte_dmadev.c | 2 ++
lib/dmadev/version.map | 3 +++
3 files changed, 6 insertions(+)
Comments
On Tue, Jul 6, 2021 at 10:29 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Export the rte_dmadevices array and the allocate and release functions
> which are needed by PMDs.
rte_dmadevices[] might be an issue for inline accesses, but pmd
allocate/release should be internal (driver only).
On Wed, Jul 07, 2021 at 10:26:36AM +0200, David Marchand wrote:
> On Tue, Jul 6, 2021 at 10:29 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > Export the rte_dmadevices array and the allocate and release functions
> > which are needed by PMDs.
>
> rte_dmadevices[] might be an issue for inline accesses, but pmd
> allocate/release should be internal (driver only).
>
So if I understand correctly, they still need to be in the version.map
file, but with "interal" versioning rather than "experimental", right?
On Wed, Jul 7, 2021 at 10:37 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Wed, Jul 07, 2021 at 10:26:36AM +0200, David Marchand wrote:
> > On Tue, Jul 6, 2021 at 10:29 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > >
> > > Export the rte_dmadevices array and the allocate and release functions
> > > which are needed by PMDs.
> >
> > rte_dmadevices[] might be an issue for inline accesses, but pmd
> > allocate/release should be internal (driver only).
> >
> So if I understand correctly, they still need to be in the version.map
drivers still need them exported, so yes they must be in version.map
with INTERNAL version.
> file, but with "interal" versioning rather than "experimental", right?
But I would move them too in a separate header, for drivers, like
ethdev_driver.h.
And the __rte_internal tag will be needed at their declarations.
https://git.dpdk.org/dpdk/tree/lib/ethdev/ethdev_driver.h#n1005
https://git.dpdk.org/dpdk/tree/lib/ethdev/version.map#n257
@@ -9,6 +9,7 @@ subdirs = [
'common/mlx5', # depends on bus.
'common/qat', # depends on bus.
'common/sfc_efx', # depends on bus.
+ 'dma', # depends on bus.
'mempool', # depends on common and bus.
'net', # depends on common, bus, mempool
'raw', # depends on common, bus and net.
@@ -372,6 +372,7 @@ rte_dmadev_find_free_device_index(void)
return RTE_DMADEV_MAX_DEVS;
}
+__rte_experimental
struct rte_dmadev *
rte_dmadev_pmd_allocate(const char *name, size_t dev_priv_size, int socket_id)
{
@@ -414,6 +415,7 @@ rte_dmadev_pmd_allocate(const char *name, size_t dev_priv_size, int socket_id)
return dev;
}
+__rte_experimental
int
rte_dmadev_pmd_release(struct rte_dmadev *dev)
{
@@ -1,6 +1,8 @@
EXPERIMENTAL {
global:
+ rte_dmadevices;
+ rte_dmadev_pmd_allocate;
rte_dmadev_count;
rte_dmadev_get_dev_id;
rte_dmadev_socket_id;
@@ -19,6 +21,7 @@ EXPERIMENTAL {
rte_dmadev_fill_sg;
rte_dmadev_fence;
rte_dmadev_perform;
+ rte_dmadev_pmd_release;
rte_dmadev_completed;
rte_dmadev_completed_fails;
rte_dmadev_stats_get;