* [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions
@ 2016-09-20 16:17 Ferruh Yigit
2016-09-20 16:17 ` [dpdk-dev] [PATCH 2/2] mempool: fix comments for no contiguous flag Ferruh Yigit
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Ferruh Yigit @ 2016-09-20 16:17 UTC (permalink / raw)
To: dev; +Cc: Olivier Matz
Fixes: 85226f9c526b ("mempool: introduce a function to create an empty pool")
Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_mempool/rte_mempool.c | 4 +---
lib/librte_mempool/rte_mempool.h | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index df8b68c..e96d14f 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -908,9 +908,7 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,
/*
* Create the mempool over already allocated chunk of memory.
* That external memory buffer can consists of physically disjoint pages.
- * Setting vaddr to NULL, makes mempool to fallback to original behaviour
- * and allocate space for mempool and it's elements as one big chunk of
- * physically continuos memory.
+ * Setting vaddr to NULL, makes mempool to fallback to original behaviour.
*/
struct rte_mempool *
rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 0243f9e..6fc331a 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -591,8 +591,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);
*
* This function uses ``memzone_reserve()`` to allocate memory. The
* pool contains n elements of elt_size. Its size is set to n.
- * All elements of the mempool are allocated together with the mempool header,
- * in one physically continuous chunk of memory.
*
* @param name
* The name of the mempool.
@@ -748,7 +746,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
*
* The mempool is allocated and initialized, but it is not populated: no
* memory is allocated for the mempool elements. The user has to call
- * rte_mempool_populate_*() or to add memory chunks to the pool. Once
+ * rte_mempool_populate_*() to add memory chunks to the pool. Once
* populated, the user may also want to initialize each object with
* rte_mempool_obj_iter().
*
--
2.7.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 2/2] mempool: fix comments for no contiguous flag
2016-09-20 16:17 [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions Ferruh Yigit
@ 2016-09-20 16:17 ` Ferruh Yigit
2016-09-21 15:12 ` Olivier Matz
2016-09-21 15:04 ` [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions Olivier Matz
2016-09-28 13:59 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
2 siblings, 1 reply; 11+ messages in thread
From: Ferruh Yigit @ 2016-09-20 16:17 UTC (permalink / raw)
To: dev; +Cc: Olivier Matz
Fixes: ce94a51ff05c ("mempool: add flag for removing phys contiguous constraint")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_mempool/rte_mempool.c | 4 +++-
lib/librte_mempool/rte_mempool.h | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index e96d14f..d767f39 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -340,7 +340,9 @@ rte_mempool_free_memchunks(struct rte_mempool *mp)
}
/* Add objects in the pool, using a physically contiguous memory
- * zone. Return the number of objects added, or a negative value
+ * zone if MEMPOOL_F_NO_PHYS_CONTIG flag is not set.
+ *
+ * Return the number of objects added, or a negative value
* on error.
*/
int
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 6fc331a..291c168 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -798,6 +798,9 @@ rte_mempool_free(struct rte_mempool *mp);
* Add a virtually and physically contiguous memory chunk in the pool
* where objects can be instanciated.
*
+ * mempool flag MEMPOOL_F_NO_PHYS_CONTIG changes behavior of the function
+ * and removes physical contiguous constraint.
+ *
* @param mp
* A pointer to the mempool structure.
* @param vaddr
--
2.7.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions
2016-09-20 16:17 [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions Ferruh Yigit
2016-09-20 16:17 ` [dpdk-dev] [PATCH 2/2] mempool: fix comments for no contiguous flag Ferruh Yigit
@ 2016-09-21 15:04 ` Olivier Matz
2016-09-21 16:16 ` Ferruh Yigit
2016-09-28 13:59 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
2 siblings, 1 reply; 11+ messages in thread
From: Olivier Matz @ 2016-09-21 15:04 UTC (permalink / raw)
To: Ferruh Yigit, dev
Hi Ferruh,
Thanks for checking the API documentation.
Please see few comments below.
On 09/20/2016 06:17 PM, Ferruh Yigit wrote:
> Fixes: 85226f9c526b ("mempool: introduce a function to create an empty pool")
> Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default")
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> lib/librte_mempool/rte_mempool.c | 4 +---
> lib/librte_mempool/rte_mempool.h | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
> index df8b68c..e96d14f 100644
> --- a/lib/librte_mempool/rte_mempool.c
> +++ b/lib/librte_mempool/rte_mempool.c
> @@ -908,9 +908,7 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,
> /*
> * Create the mempool over already allocated chunk of memory.
> * That external memory buffer can consists of physically disjoint pages.
> - * Setting vaddr to NULL, makes mempool to fallback to original behaviour
> - * and allocate space for mempool and it's elements as one big chunk of
> - * physically continuos memory.
> + * Setting vaddr to NULL, makes mempool to fallback to original behaviour.
I would replace "original behaviour" by "rte_mempool_create() behaviour".
> */
> struct rte_mempool *
> rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
> diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
> index 0243f9e..6fc331a 100644
> --- a/lib/librte_mempool/rte_mempool.h
> +++ b/lib/librte_mempool/rte_mempool.h
> @@ -591,8 +591,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);
> *
> * This function uses ``memzone_reserve()`` to allocate memory. The
> * pool contains n elements of elt_size. Its size is set to n.
> - * All elements of the mempool are allocated together with the mempool header,
> - * in one physically continuous chunk of memory.
While there, maybe we could replace ``memzone_reserve()`` by
``rte_memzone_reserve()``.
> *
> * @param name
> * The name of the mempool.
> @@ -748,7 +746,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
> *
> * The mempool is allocated and initialized, but it is not populated: no
> * memory is allocated for the mempool elements. The user has to call
> - * rte_mempool_populate_*() or to add memory chunks to the pool. Once
> + * rte_mempool_populate_*() to add memory chunks to the pool. Once
> * populated, the user may also want to initialize each object with
> * rte_mempool_obj_iter().
> *
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] mempool: fix comments for no contiguous flag
2016-09-20 16:17 ` [dpdk-dev] [PATCH 2/2] mempool: fix comments for no contiguous flag Ferruh Yigit
@ 2016-09-21 15:12 ` Olivier Matz
2016-09-21 16:15 ` Ferruh Yigit
0 siblings, 1 reply; 11+ messages in thread
From: Olivier Matz @ 2016-09-21 15:12 UTC (permalink / raw)
To: Ferruh Yigit, dev
Hi Ferruh,
On 09/20/2016 06:17 PM, Ferruh Yigit wrote:
> Fixes: ce94a51ff05c ("mempool: add flag for removing phys contiguous constraint")
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> lib/librte_mempool/rte_mempool.c | 4 +++-
> lib/librte_mempool/rte_mempool.h | 3 +++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
> index e96d14f..d767f39 100644
> --- a/lib/librte_mempool/rte_mempool.c
> +++ b/lib/librte_mempool/rte_mempool.c
> @@ -340,7 +340,9 @@ rte_mempool_free_memchunks(struct rte_mempool *mp)
> }
>
> /* Add objects in the pool, using a physically contiguous memory
> - * zone. Return the number of objects added, or a negative value
> + * zone if MEMPOOL_F_NO_PHYS_CONTIG flag is not set.
> + *
> + * Return the number of objects added, or a negative value
> * on error.
> */
> int
> diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
> index 6fc331a..291c168 100644
> --- a/lib/librte_mempool/rte_mempool.h
> +++ b/lib/librte_mempool/rte_mempool.h
> @@ -798,6 +798,9 @@ rte_mempool_free(struct rte_mempool *mp);
> * Add a virtually and physically contiguous memory chunk in the pool
> * where objects can be instanciated.
> *
> + * mempool flag MEMPOOL_F_NO_PHYS_CONTIG changes behavior of the function
> + * and removes physical contiguous constraint.
> + *
> * @param mp
> * A pointer to the mempool structure.
> * @param vaddr
>
Not sure I'm getting why you add these comments, as I don't see any
usage of MEMPOOL_F_NO_PHYS_CONTIG in rte_mempool_populate_phys().
Could you describe what makes you think the API comments are wrong here?
Thanks,
Olivier
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] mempool: fix comments for no contiguous flag
2016-09-21 15:12 ` Olivier Matz
@ 2016-09-21 16:15 ` Ferruh Yigit
2016-09-22 7:23 ` Olivier Matz
0 siblings, 1 reply; 11+ messages in thread
From: Ferruh Yigit @ 2016-09-21 16:15 UTC (permalink / raw)
To: Olivier Matz, dev
Hi Olivier,
On 9/21/2016 4:12 PM, Olivier Matz wrote:
> Hi Ferruh,
>
> On 09/20/2016 06:17 PM, Ferruh Yigit wrote:
>> Fixes: ce94a51ff05c ("mempool: add flag for removing phys contiguous constraint")
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> lib/librte_mempool/rte_mempool.c | 4 +++-
>> lib/librte_mempool/rte_mempool.h | 3 +++
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
>> index e96d14f..d767f39 100644
>> --- a/lib/librte_mempool/rte_mempool.c
>> +++ b/lib/librte_mempool/rte_mempool.c
>> @@ -340,7 +340,9 @@ rte_mempool_free_memchunks(struct rte_mempool *mp)
>> }
>>
>> /* Add objects in the pool, using a physically contiguous memory
>> - * zone. Return the number of objects added, or a negative value
>> + * zone if MEMPOOL_F_NO_PHYS_CONTIG flag is not set.
>> + *
>> + * Return the number of objects added, or a negative value
>> * on error.
>> */
>> int
>> diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
>> index 6fc331a..291c168 100644
>> --- a/lib/librte_mempool/rte_mempool.h
>> +++ b/lib/librte_mempool/rte_mempool.h
>> @@ -798,6 +798,9 @@ rte_mempool_free(struct rte_mempool *mp);
>> * Add a virtually and physically contiguous memory chunk in the pool
>> * where objects can be instanciated.
>> *
>> + * mempool flag MEMPOOL_F_NO_PHYS_CONTIG changes behavior of the function
>> + * and removes physical contiguous constraint.
>> + *
>> * @param mp
>> * A pointer to the mempool structure.
>> * @param vaddr
>>
>
> Not sure I'm getting why you add these comments, as I don't see any
> usage of MEMPOOL_F_NO_PHYS_CONTIG in rte_mempool_populate_phys().
>
> Could you describe what makes you think the API comments are wrong here?
rte_mempool_populate_phys() now can get RTE_BAD_PHYS_ADDR as "paddr"
variable, and when paddr == RTE_BAD_PHYS_ADDR, function no more
quarantines that populated items are physically continuous.
Like how this is used in rte_mempool_populate_phys_tab(), if
MEMPOOL_F_NO_PHYS_CONTIG is set rte_mempool_populate_phys() called for
whole virtually continuous memory (len: pg_num * pg_size), so resulting
items may not be in physically continuous addresses, so function comment
becomes wrong.
Although MEMPOOL_F_NO_PHYS_CONTIG is not used within the
rte_mempool_populate_phys(), as far as I can see flag has a side effect
on the functionality.
And please help on wording if it is not accurate.
>
> Thanks,
> Olivier
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions
2016-09-21 15:04 ` [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions Olivier Matz
@ 2016-09-21 16:16 ` Ferruh Yigit
0 siblings, 0 replies; 11+ messages in thread
From: Ferruh Yigit @ 2016-09-21 16:16 UTC (permalink / raw)
To: Olivier Matz, dev
On 9/21/2016 4:04 PM, Olivier Matz wrote:
> Hi Ferruh,
>
> Thanks for checking the API documentation.
> Please see few comments below.
>
> On 09/20/2016 06:17 PM, Ferruh Yigit wrote:
>> Fixes: 85226f9c526b ("mempool: introduce a function to create an empty pool")
>> Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default")
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> lib/librte_mempool/rte_mempool.c | 4 +---
>> lib/librte_mempool/rte_mempool.h | 4 +---
>> 2 files changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
>> index df8b68c..e96d14f 100644
>> --- a/lib/librte_mempool/rte_mempool.c
>> +++ b/lib/librte_mempool/rte_mempool.c
>> @@ -908,9 +908,7 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,
>> /*
>> * Create the mempool over already allocated chunk of memory.
>> * That external memory buffer can consists of physically disjoint pages.
>> - * Setting vaddr to NULL, makes mempool to fallback to original behaviour
>> - * and allocate space for mempool and it's elements as one big chunk of
>> - * physically continuos memory.
>> + * Setting vaddr to NULL, makes mempool to fallback to original behaviour.
>
> I would replace "original behaviour" by "rte_mempool_create() behaviour".
>
>> */
>> struct rte_mempool *
>> rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
>> diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
>> index 0243f9e..6fc331a 100644
>> --- a/lib/librte_mempool/rte_mempool.h
>> +++ b/lib/librte_mempool/rte_mempool.h
>> @@ -591,8 +591,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);
>> *
>> * This function uses ``memzone_reserve()`` to allocate memory. The
>> * pool contains n elements of elt_size. Its size is set to n.
>> - * All elements of the mempool are allocated together with the mempool header,
>> - * in one physically continuous chunk of memory.
>
> While there, maybe we could replace ``memzone_reserve()`` by
> ``rte_memzone_reserve()``.
>
>> *
>> * @param name
>> * The name of the mempool.
>> @@ -748,7 +746,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
>> *
>> * The mempool is allocated and initialized, but it is not populated: no
>> * memory is allocated for the mempool elements. The user has to call
>> - * rte_mempool_populate_*() or to add memory chunks to the pool. Once
>> + * rte_mempool_populate_*() to add memory chunks to the pool. Once
>> * populated, the user may also want to initialize each object with
>> * rte_mempool_obj_iter().
>> *
>>
Thanks for the comments, I will send a new version of the patch with
suggested fixes.
Thanks,
ferruh
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] mempool: fix comments for no contiguous flag
2016-09-21 16:15 ` Ferruh Yigit
@ 2016-09-22 7:23 ` Olivier Matz
0 siblings, 0 replies; 11+ messages in thread
From: Olivier Matz @ 2016-09-22 7:23 UTC (permalink / raw)
To: Ferruh Yigit, dev
Hi Ferruh,
On 09/21/2016 06:15 PM, Ferruh Yigit wrote:
> Hi Olivier,
>
> On 9/21/2016 4:12 PM, Olivier Matz wrote:
>> Hi Ferruh,
>>
>> On 09/20/2016 06:17 PM, Ferruh Yigit wrote:
>>> Fixes: ce94a51ff05c ("mempool: add flag for removing phys contiguous constraint")
>>>
>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>> ---
>>> lib/librte_mempool/rte_mempool.c | 4 +++-
>>> lib/librte_mempool/rte_mempool.h | 3 +++
>>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
>>> index e96d14f..d767f39 100644
>>> --- a/lib/librte_mempool/rte_mempool.c
>>> +++ b/lib/librte_mempool/rte_mempool.c
>>> @@ -340,7 +340,9 @@ rte_mempool_free_memchunks(struct rte_mempool *mp)
>>> }
>>>
>>> /* Add objects in the pool, using a physically contiguous memory
>>> - * zone. Return the number of objects added, or a negative value
>>> + * zone if MEMPOOL_F_NO_PHYS_CONTIG flag is not set.
>>> + *
>>> + * Return the number of objects added, or a negative value
>>> * on error.
>>> */
>>> int
>>> diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
>>> index 6fc331a..291c168 100644
>>> --- a/lib/librte_mempool/rte_mempool.h
>>> +++ b/lib/librte_mempool/rte_mempool.h
>>> @@ -798,6 +798,9 @@ rte_mempool_free(struct rte_mempool *mp);
>>> * Add a virtually and physically contiguous memory chunk in the pool
>>> * where objects can be instanciated.
>>> *
>>> + * mempool flag MEMPOOL_F_NO_PHYS_CONTIG changes behavior of the function
>>> + * and removes physical contiguous constraint.
>>> + *
>>> * @param mp
>>> * A pointer to the mempool structure.
>>> * @param vaddr
>>>
>>
>> Not sure I'm getting why you add these comments, as I don't see any
>> usage of MEMPOOL_F_NO_PHYS_CONTIG in rte_mempool_populate_phys().
>>
>> Could you describe what makes you think the API comments are wrong here?
>
> rte_mempool_populate_phys() now can get RTE_BAD_PHYS_ADDR as "paddr"
> variable, and when paddr == RTE_BAD_PHYS_ADDR, function no more
> quarantines that populated items are physically continuous.
>
> Like how this is used in rte_mempool_populate_phys_tab(), if
> MEMPOOL_F_NO_PHYS_CONTIG is set rte_mempool_populate_phys() called for
> whole virtually continuous memory (len: pg_num * pg_size), so resulting
> items may not be in physically continuous addresses, so function comment
> becomes wrong.
>
> Although MEMPOOL_F_NO_PHYS_CONTIG is not used within the
> rte_mempool_populate_phys(), as far as I can see flag has a side effect
> on the functionality.
>
> And please help on wording if it is not accurate.
OK, so I think we should just talk about paddr in the API comment of
rte_mempool_populate_phys(), not about the flag which is already
documented in mempool_create*().
I suggest the following:
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -800,6 +800,10 @@ rte_mempool_free(struct rte_mempool *mp);
* Add a virtually and physically contiguous memory chunk in the pool
* where objects can be instanciated.
*
+ * If the given physical address is unknown (paddr = RTE_BAD_PHYS_ADDR),
+ * the chunk doesn't need to be physically contiguous (only virtually),
+ * and allocated objects may span two pages.
+ *
* @param mp
* A pointer to the mempool structure.
* @param vaddr
What do you think?
Regards
Olivier
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] mempool: fix comments for mempool create functions
2016-09-20 16:17 [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions Ferruh Yigit
2016-09-20 16:17 ` [dpdk-dev] [PATCH 2/2] mempool: fix comments for no contiguous flag Ferruh Yigit
2016-09-21 15:04 ` [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions Olivier Matz
@ 2016-09-28 13:59 ` Ferruh Yigit
2016-09-28 13:59 ` [dpdk-dev] [PATCH v2 2/2] mempool: fix comments for no contiguous flag Ferruh Yigit
2016-10-03 15:06 ` [dpdk-dev] [PATCH v2 1/2] mempool: fix comments for mempool create functions Olivier Matz
2 siblings, 2 replies; 11+ messages in thread
From: Ferruh Yigit @ 2016-09-28 13:59 UTC (permalink / raw)
To: dev; +Cc: Olivier Matz
Fixes: 85226f9c526b ("mempool: introduce a function to create an empty pool")
Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_mempool/rte_mempool.c | 5 ++---
lib/librte_mempool/rte_mempool.h | 6 ++----
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index df8b68c..71017e1 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -908,9 +908,8 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,
/*
* Create the mempool over already allocated chunk of memory.
* That external memory buffer can consists of physically disjoint pages.
- * Setting vaddr to NULL, makes mempool to fallback to original behaviour
- * and allocate space for mempool and it's elements as one big chunk of
- * physically continuos memory.
+ * Setting vaddr to NULL, makes mempool to fallback to rte_mempool_create()
+ * behavior.
*/
struct rte_mempool *
rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 0243f9e..7a9cc3a 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -589,10 +589,8 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);
/**
* Create a new mempool named *name* in memory.
*
- * This function uses ``memzone_reserve()`` to allocate memory. The
+ * This function uses ``rte_memzone_reserve()`` to allocate memory. The
* pool contains n elements of elt_size. Its size is set to n.
- * All elements of the mempool are allocated together with the mempool header,
- * in one physically continuous chunk of memory.
*
* @param name
* The name of the mempool.
@@ -748,7 +746,7 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
*
* The mempool is allocated and initialized, but it is not populated: no
* memory is allocated for the mempool elements. The user has to call
- * rte_mempool_populate_*() or to add memory chunks to the pool. Once
+ * rte_mempool_populate_*() to add memory chunks to the pool. Once
* populated, the user may also want to initialize each object with
* rte_mempool_obj_iter().
*
--
2.7.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] mempool: fix comments for no contiguous flag
2016-09-28 13:59 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
@ 2016-09-28 13:59 ` Ferruh Yigit
2016-10-03 15:06 ` [dpdk-dev] [PATCH v2 1/2] mempool: fix comments for mempool create functions Olivier Matz
1 sibling, 0 replies; 11+ messages in thread
From: Ferruh Yigit @ 2016-09-28 13:59 UTC (permalink / raw)
To: dev; +Cc: Olivier Matz
Fixes: ce94a51ff05c ("mempool: add flag for removing phys contiguous constraint")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_mempool/rte_mempool.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 7a9cc3a..e7a10e0 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -798,6 +798,10 @@ rte_mempool_free(struct rte_mempool *mp);
* Add a virtually and physically contiguous memory chunk in the pool
* where objects can be instanciated.
*
+ * If the given physical address is unknown (paddr = RTE_BAD_PHYS_ADDR),
+ * the chunk doesn't need to be physically contiguous (only virtually),
+ * and allocated objects may span two pages.
+ *
* @param mp
* A pointer to the mempool structure.
* @param vaddr
--
2.7.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] mempool: fix comments for mempool create functions
2016-09-28 13:59 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
2016-09-28 13:59 ` [dpdk-dev] [PATCH v2 2/2] mempool: fix comments for no contiguous flag Ferruh Yigit
@ 2016-10-03 15:06 ` Olivier Matz
2016-10-04 9:18 ` Thomas Monjalon
1 sibling, 1 reply; 11+ messages in thread
From: Olivier Matz @ 2016-10-03 15:06 UTC (permalink / raw)
To: Ferruh Yigit, dev
On 09/28/2016 03:59 PM, Ferruh Yigit wrote:
> Fixes: 85226f9c526b ("mempool: introduce a function to create an empty pool")
> Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default")
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
Series:
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thanks
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] mempool: fix comments for mempool create functions
2016-10-03 15:06 ` [dpdk-dev] [PATCH v2 1/2] mempool: fix comments for mempool create functions Olivier Matz
@ 2016-10-04 9:18 ` Thomas Monjalon
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2016-10-04 9:18 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, Olivier Matz
2016-10-03 17:06, Olivier Matz:
> On 09/28/2016 03:59 PM, Ferruh Yigit wrote:
> > Fixes: 85226f9c526b ("mempool: introduce a function to create an empty pool")
> > Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default")
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Series:
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Applied, thanks
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-10-04 9:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20 16:17 [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions Ferruh Yigit
2016-09-20 16:17 ` [dpdk-dev] [PATCH 2/2] mempool: fix comments for no contiguous flag Ferruh Yigit
2016-09-21 15:12 ` Olivier Matz
2016-09-21 16:15 ` Ferruh Yigit
2016-09-22 7:23 ` Olivier Matz
2016-09-21 15:04 ` [dpdk-dev] [PATCH 1/2] mempool: fix comments for mempool create functions Olivier Matz
2016-09-21 16:16 ` Ferruh Yigit
2016-09-28 13:59 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
2016-09-28 13:59 ` [dpdk-dev] [PATCH v2 2/2] mempool: fix comments for no contiguous flag Ferruh Yigit
2016-10-03 15:06 ` [dpdk-dev] [PATCH v2 1/2] mempool: fix comments for mempool create functions Olivier Matz
2016-10-04 9:18 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).