[dpdk-dev,2/2,v2] kni: Add documentation for the mempool capacity

Message ID 1463815522-27916-2-git-send-email-ee07b291@gmail.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

ALeX Wang May 21, 2016, 7:25 a.m. UTC
  From: Alex Wang <alex@awakenetworks.com>

Function like 'rte_kni_rx_burst()' keeps
allocating 'MAX_MBUF_BURST_NUM' mbufs to
kni fifo queue unless the queue's capacity
('KNI_FIFO_COUNT_MAX') is reached.  So, if
the mempool is under-provisioned, user may
run into "Out of Memory" logs from KNI code.
This commit documents the need to provision
mempool capacity of more than
"2 x KNI_FIFO_COUNT_MAX" for each KNI interface.

Signed-off-by: Alex Wang <alex@awakenetworks.com>
---
 lib/librte_kni/rte_kni.h | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Ferruh Yigit May 23, 2016, 5 p.m. UTC | #1
On 5/21/2016 8:25 AM, Alex Wang wrote:
> From: Alex Wang <alex@awakenetworks.com>
> 
> Function like 'rte_kni_rx_burst()' keeps
> allocating 'MAX_MBUF_BURST_NUM' mbufs to
> kni fifo queue unless the queue's capacity
> ('KNI_FIFO_COUNT_MAX') is reached.  So, if
> the mempool is under-provisioned, user may
> run into "Out of Memory" logs from KNI code.
> This commit documents the need to provision
> mempool capacity of more than
> "2 x KNI_FIFO_COUNT_MAX" for each KNI interface.
> 
> Signed-off-by: Alex Wang <alex@awakenetworks.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit May 23, 2016, 5:10 p.m. UTC | #2
On 5/23/2016 6:00 PM, Ferruh Yigit wrote:
> On 5/21/2016 8:25 AM, Alex Wang wrote:
>> From: Alex Wang <alex@awakenetworks.com>
>>
>> Function like 'rte_kni_rx_burst()' keeps
>> allocating 'MAX_MBUF_BURST_NUM' mbufs to
>> kni fifo queue unless the queue's capacity
>> ('KNI_FIFO_COUNT_MAX') is reached.  So, if
>> the mempool is under-provisioned, user may
>> run into "Out of Memory" logs from KNI code.
>> This commit documents the need to provision
>> mempool capacity of more than
>> "2 x KNI_FIFO_COUNT_MAX" for each KNI interface.
>>
>> Signed-off-by: Alex Wang <alex@awakenetworks.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 

Hi Alex,

This is detail but I just recognized patch subject after tag starts with
uppercase. Would you mind sending another patch? You can keep my ack
with it.

Thanks,
ferruh
  
Alex Wang May 23, 2016, 5:12 p.m. UTC | #3
Shoooot, sorry for missing that, sending V3,

On Mon, May 23, 2016 at 10:10 AM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:

> On 5/23/2016 6:00 PM, Ferruh Yigit wrote:
> > On 5/21/2016 8:25 AM, Alex Wang wrote:
> >> From: Alex Wang <alex@awakenetworks.com>
> >>
> >> Function like 'rte_kni_rx_burst()' keeps
> >> allocating 'MAX_MBUF_BURST_NUM' mbufs to
> >> kni fifo queue unless the queue's capacity
> >> ('KNI_FIFO_COUNT_MAX') is reached.  So, if
> >> the mempool is under-provisioned, user may
> >> run into "Out of Memory" logs from KNI code.
> >> This commit documents the need to provision
> >> mempool capacity of more than
> >> "2 x KNI_FIFO_COUNT_MAX" for each KNI interface.
> >>
> >> Signed-off-by: Alex Wang <alex@awakenetworks.com>
> >
> > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >
>
> Hi Alex,
>
> This is detail but I just recognized patch subject after tag starts with
> uppercase. Would you mind sending another patch? You can keep my ack
> with it.
>
> Thanks,
> ferruh
>
  

Patch

diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index 25fa45e..ac11148 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -113,6 +113,9 @@  extern void rte_kni_init(unsigned int max_kni_ifaces);
  * The rte_kni_alloc shall not be called before rte_kni_init() has been
  * called. rte_kni_alloc is thread safe.
  *
+ * The mempool should have capacity of more than "2 x KNI_FIFO_COUNT_MAX"
+ * elements for each KNI interface allocated.
+ *
  * @param pktmbuf_pool
  *  The mempool for allocting mbufs for packets.
  * @param conf