8eba5ebd18
alloc_q and rx_q fifos holds physical address of the mbufs, and not able to free those mbufs explicitly. But kernel thread reads from rx_q and puts used mbufs into free_q (with their virtual addresses.) And kernel thread stopped when application close the /dev/kni file on exit. So rx_q has time to be consumed by kernel thread but leak is technically possible. Another fifo, alloc_q has physical addresses too, but all those coming from same mempool provided by application, when application quit, all mempool already returned back, so this leak can be ignored. Added check and wait logic for rx_q to be sure kernel consumed the fifo, an error message printed after some ammount of wait, and an explicit mempool free added for alloc_q. Fixes: 8451269e6d7b ("kni: remove continuous memory restriction") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>