Skip to contentSkip to conversation

mempool/octeontx2: remove minimum chunck size limitation

PATCH Applied [email protected] 3 participants 3 messages Sep 10, 2019 – Oct 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mempool/octeontx2: remove minimum chunck size limitation

From: Vamsi Attunuru <[email protected]>

Memory required for the mempool objects need not be physically contiguous on octeontx2's HW, mempool pmd supports the minimum chunk size set by the default handler. Hence discarding the limitation set by the pmd on the min_chunk_size value.

---
 drivers/mempool/octeontx2/otx2_mempool_ops.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
drivers/mempool/octeontx2/otx2_mempool_ops.c +2 -14
index f5a4fe3..d769575 100644
@@ -713,24 +713,12 @@ static ssize_t
 otx2_npa_calc_mem_size(const struct rte_mempool *mp, uint32_t obj_num,
 		       uint32_t pg_shift, size_t *min_chunk_size, size_t *align)
 {
-	ssize_t mem_size;
-
 	/*
 	 * Simply need space for one more object to be able to
 	 * fulfill alignment requirements.
 	 */
-	mem_size = rte_mempool_op_calc_mem_size_default(mp, obj_num + 1,
-							pg_shift,
-							min_chunk_size, align);
-	if (mem_size >= 0) {
-		/*
-		 * Memory area which contains objects must be physically
-		 * contiguous.
-		 */
-		*min_chunk_size = mem_size;
-	}
-
-	return mem_size;
+	return rte_mempool_op_calc_mem_size_default(mp, obj_num + 1, pg_shift,
+						    min_chunk_size, align);
 }
 
 static int
Signature · 1 line
2.8.4
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Tue, Sep 10, 2019 at 4:33 PM <[email protected]> wrote:

From: Vamsi Attunuru <[email protected]>

Memory required for the mempool objects need not be physically contiguous on octeontx2's HW, mempool pmd supports the minimum chunk size set by the default handler. Hence discarding the limitation set by the pmd on the min_chunk_size value.

This patch needs to go through to master repo based on MAINTAINERS file. Changing the "Delegate to" to Thomas in patchwork.

Quoted 38 lines
---
 drivers/mempool/octeontx2/otx2_mempool_ops.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
drivers/mempool/octeontx2/otx2_mempool_ops.c +2 -15
index f5a4fe3..d769575 100644
@@ -713,24 +713,12 @@ static ssize_t
 otx2_npa_calc_mem_size(const struct rte_mempool *mp, uint32_t obj_num,
                       uint32_t pg_shift, size_t *min_chunk_size, size_t *align)
 {
-       ssize_t mem_size;
-
        /*
         * Simply need space for one more object to be able to
         * fulfill alignment requirements.
         */
-       mem_size = rte_mempool_op_calc_mem_size_default(mp, obj_num + 1,
-                                                       pg_shift,
-                                                       min_chunk_size, align);
-       if (mem_size >= 0) {
-               /*
-                * Memory area which contains objects must be physically
-                * contiguous.
-                */
-               *min_chunk_size = mem_size;
-       }
-
-       return mem_size;
+       return rte_mempool_op_calc_mem_size_default(mp, obj_num + 1, pg_shift,
+                                                   min_chunk_size, align);
 }
 
 static int
--

2.8.4

#2 lore raw
Quoted 5 lines · Jerin Jacob
Quoted 3 lines · On Tue, Sep 10, 2019 at 4:33 PM <[email protected]> wrote:

From: Vamsi Attunuru <[email protected]>

Quoted 8 lines
Quoted 6 lines

Memory required for the mempool objects need not be physically contiguous on octeontx2's HW, mempool pmd supports the minimum chunk size set by the default handler. Hence discarding the limitation set by the pmd on the min_chunk_size value.

Applied, thanks.

--
David Marchand