Thread (339 messages) 339 messages, 17 authors, 2021-10-17

Re: [dpdk-dev] [PATCH v19 4/7] dmadev: introduce DMA device library implementation

From: fengchengwen <hidden>
Date: 2021-09-04 08:52:14

On 2021/9/3 23:35, Conor Walsh wrote:
quoted
This patch introduce DMA device library implementation which includes
configuration and I/O with the DMA devices.

Signed-off-by: Chengwen Feng <redacted>
Acked-by: Bruce Richardson <redacted>
Acked-by: Morten Brørup <redacted>
---
<snip>
quoted
+
+static int
+dmadev_shared_data_prepare(void)
+{
+    const struct rte_memzone *mz;
+
+    if (dmadev_shared_data == NULL) {
+        if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+            /* Allocate port data and ownership shared memory. */
+            mz = rte_memzone_reserve(mz_rte_dmadev_data,
+                     sizeof(*dmadev_shared_data),
+                     rte_socket_id(), 0);
+        } else
+            mz = rte_memzone_lookup(mz_rte_dmadev_data);
+        if (mz == NULL)
+            return -ENOMEM;
This memzone is not free'd anywhere in the library, I would suggest freeing as part of the release pmd function.
All dmadevs data is in a contiguous area.
When you release a pmd, you can't release some of it.

This is more common in other libs, so I recommend keeping it as it is.

Thanks
<snip>

Reviewed-by: Conor Walsh <redacted>

.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help