kni: fix inverted function comments
PATCH v2 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 v2 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 v2] kni: Add documentation for the mempool capacity
Quoted 12 lines · Alex Wang
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 1 line
Signed-off-by Alex Wang <[email protected]>
Re: [PATCH 2/2 v2] kni: Add documentation for the mempool capacity
Quoted 13 lines · Ferruh Yigit
Quoted 12 lines · Alex Wang
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 1 line
Signed-off-by Alex Wang <[email protected]>Acked-by Ferruh Yigit <[email protected]>
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
Re: [PATCH 2/2 v2] kni: Add documentation for the mempool capacity
Shoooot, sorry for missing that, sending V3,
Quoted 28 lines · Ferruh Yigit
Quoted 13 lines · Ferruh Yigit
Quoted 12 lines · Alex Wang
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 1 line
Signed-off-by Alex Wang <[email protected]>Acked-by Ferruh Yigit <[email protected]>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
Quoted 9 lines · Alex Wang
From: Alex Wang <[email protected]>
The 'mbufs' alloc/free descriptions for
'rte_kni_tx_burst()' and 'rte_kni_rx_burst()'
should be inverted.Fixes 3fc5ca2 (kni: initial import)Signed-off-by Alex Wang <[email protected]>