Hello,
I draw a flow via asciiflow to explain myself better. Problem is after transmitting packets(mbufs) , it never puts in the kni->free_q to back to the original pool. Each cycle, it allocates another 32 units that cause leaks. Or I am missing something.
I already tried the rte_eth_tx_done_cleanup() function but it didn't fix anything.
I am working on a patch to fix this issue but I am not sure if there is another way.
Best regards.
unsigned
rte_kni_rx_burst(struct rte_kni *kni, struct rte_mbuf **mbufs, unsigned int num)
{
unsigned int ret = kni_fifo_get(kni->tx_q, (void **)mbufs, num);
/* If buffers removed, allocate mbufs and then put them into alloc_q */
/* Question, how to test buffers is removed or not?*/
if (ret)
kni_allocate_mbufs(kni);
return ret;
}