kni: fix inverted function comments
PATCH v3 1/2 kni: fix inverted function comments
From: Alex Wang <[email protected]>
The 'mbufs' alloc/free descriptions for
'rte_kni_tx_burst()' and 'rte_kni_rx_burst()'
should be inverted.
--- lib/librte_kni/rte_kni.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
lib/librte_kni/rte_kni.h +4 -4
@@ -161,8 +161,8 @@ extern int rte_kni_handle_request(struct rte_kni *kni);/** * Retrieve a burst of packets from a KNI interface. The retrieved packets are * stored in rte_mbuf structures whose pointers are supplied in the array of -* mbufs, and the maximum number is indicated by num. It handles the freeing of -* the mbufs in the free queue of KNI interface. +* mbufs, and the maximum number is indicated by num. It handles allocating +* the mbufs for KNI interface alloc queue. * * @param kni * The KNI interface context.
@@ -180,8 +180,8 @@ extern unsigned rte_kni_rx_burst(struct rte_kni *kni,/** * Send a burst of packets to a KNI interface. The packets to be sent out are * stored in rte_mbuf structures whose pointers are supplied in the array of -* mbufs, and the maximum number is indicated by num. It handles allocating -* the mbufs for KNI interface alloc queue. +* mbufs, and the maximum number is indicated by num. It handles the freeing of +* the mbufs in the free queue of KNI interface. * * @param kni * The KNI interface context.
Signature · 1 line
2.1.4
PATCH v3 2/2 kni: add documentation for the mempool capacity
From: Alex Wang <[email protected]>
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.
--- lib/librte_kni/rte_kni.h | 3 +++ 1 file changed, 3 insertions(+)
lib/librte_kni/rte_kni.h +3 -0
@@ -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
Signature · 1 line
2.1.4
Re: [PATCH 2/2 v3] kni: add documentation for the mempool capacity
Quoted 18 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Alex Wang
Sent: Saturday, May 21, 2016 8:59 AM
To: [email protected]
Cc: Yigit, Ferruh <[email protected]>; Alex Wang <[email protected]>
Subject: [dpdk-dev] [PATCH 2/2 v3] kni: add documentation for the mempool capacityFrom: Alex Wang <[email protected]>
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 xKNI_FIFO_COUNT_MAX" for each KNI interface.
Quoted 2 lines
Signed-off-by Alex Wang <[email protected]>Acked-by Ferruh Yigit <[email protected]>
Re: [PATCH 2/2 v3] kni: add documentation for the mempool capacity
Just to confirm, should I do anything before it gets merged?
Quoted 24 lines · John
Quoted 18 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Alex Wang
Sent: Saturday, May 21, 2016 8:59 AM
To: [email protected]
Cc: Yigit, Ferruh <[email protected]>; Alex Wang <[email protected]>
Subject: [dpdk-dev] [PATCH 2/2 v3] kni: add documentation for the mempool capacityFrom: Alex Wang <[email protected]>
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 xKNI_FIFO_COUNT_MAX" for each KNI interface.Quoted 2 lines
Signed-off-by Alex Wang <[email protected]>Acked-by Ferruh Yigit <[email protected]>Acked-by John McNamara <[email protected]>
Re: [PATCH 2/2 v3] kni: add documentation for the mempool capacity
Quoted 1 line
Just to confirm, should I do anything before it gets merged?
No. Looks good to me. Now you just need to wait. :-)
John.
Thomas Monjalon
AppliedRe: [PATCH 2/2 v3] kni: add documentation for the mempool capacity
In reply to Mcnamara, JohnQuoted 9 lines
Quoted 9 lines
From: Alex Wang <[email protected]>
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 xKNI_FIFO_COUNT_MAX" for each KNI interface.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Alex Wang <[email protected]>Acked-by Ferruh Yigit <[email protected]>Acked-by John McNamara <[email protected]>
Applied, thanks