-----Original Message-----
From: Anatoly Burakov <[email protected]>
Date: Wednesday, March 7, 2018 at 8:57 AM
To: "[email protected]" <[email protected]>
Cc: "Mody, Rasesh" <[email protected]>, Harish Patil
<[email protected]>, "Shaikh, Shahed" <[email protected]>,
"[email protected]" <[email protected]>, "[email protected]"
<[email protected]>, "[email protected]"
<[email protected]>, "[email protected]"
<[email protected]>, "[email protected]"
<[email protected]>, "[email protected]"
<[email protected]>, "[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]"
<[email protected]>, "[email protected]"
<[email protected]>, "[email protected]"
<[email protected]>, "[email protected]" <[email protected]>,
"[email protected]" <[email protected]>, "Jacob,  Jerin"
<[email protected]>, "[email protected]"
<[email protected]>, "[email protected]" <[email protected]>
Subject: [PATCH v2 39/41] net/qede: use contiguous allocation for DMA
memory

>Signed-off-by: Anatoly Burakov <[email protected]>
>---
>
>Notes:
>    Doing "grep -R rte_memzone_reserve drivers/net/qede" returns the
>following:
>    
>    drivers/net/qede/qede_fdir.c:     mz =
>rte_memzone_reserve_aligned(mz_name, QEDE_MAX_FDIR_PKT_LEN,
>    drivers/net/qede/base/bcm_osal.c: mz =
>rte_memzone_reserve_aligned_contig(mz_name, size,
>    drivers/net/qede/base/bcm_osal.c: mz =
>rte_memzone_reserve_aligned_contig(mz_name, size, socket_id, 0,
>    
>    I took a brief look at memzone in qede_fdir and it didn't look like
>memzone
>    was used for DMA, so i left it alone. Corrections welcome.

That’s right.
>
> drivers/net/qede/base/bcm_osal.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/qede/base/bcm_osal.c
>b/drivers/net/qede/base/bcm_osal.c
>index fe42f32..707d553 100644
>--- a/drivers/net/qede/base/bcm_osal.c
>+++ b/drivers/net/qede/base/bcm_osal.c
>@@ -135,7 +135,7 @@ void *osal_dma_alloc_coherent(struct ecore_dev *p_dev,
>       if (core_id == (unsigned int)LCORE_ID_ANY)
>               core_id = 0;
>       socket_id = rte_lcore_to_socket_id(core_id);
>-      mz = rte_memzone_reserve_aligned(mz_name, size,
>+      mz = rte_memzone_reserve_aligned_contig(mz_name, size,
>                                        socket_id, 0, RTE_CACHE_LINE_SIZE);
>       if (!mz) {
>               DP_ERR(p_dev, "Unable to allocate DMA memory "
>@@ -174,7 +174,8 @@ void *osal_dma_alloc_coherent_aligned(struct
>ecore_dev *p_dev,
>       if (core_id == (unsigned int)LCORE_ID_ANY)
>               core_id = 0;
>       socket_id = rte_lcore_to_socket_id(core_id);
>-      mz = rte_memzone_reserve_aligned(mz_name, size, socket_id, 0, align);
>+      mz = rte_memzone_reserve_aligned_contig(mz_name, size, socket_id, 0,
>+                      align);
>       if (!mz) {
>               DP_ERR(p_dev, "Unable to allocate DMA memory "
>                      "of size %zu bytes - %s\n",
>-- 
>2.7.4

Acked-by: Harish Patil <[email protected]>

>

Reply via email to