DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] KNI and memzones
@ 2014-09-23  9:27 Marc Sune
  2014-09-23 12:39 ` Jay Rolette
  0 siblings, 1 reply; 7+ messages in thread
From: Marc Sune @ 2014-09-23  9:27 UTC (permalink / raw)
  To: <dev@dpdk.org>; +Cc: dev-team

Hi all,

So we are having some problems with KNI. In short, we have a DPDK 
application that creates KNI interfaces and destroys them during its 
lifecycle and connecting them to DOCKER containers. Interfaces may 
eventually be even named the same (see below).

We were wondering why even calling rte_kni_release() the hugepages 
memory was rapidly being exhausted, and we also realised even after 
destruction, you cannot use the same name for the interface.

After close inspection of the rte_kni lib we think the core issue and is 
mostly a design issue. rte_kni_alloc ends up calling 
kni_memzone_reserve() that calls at the end rte_memzone_reserve() which 
cannot be unreserved by rte_kni_relese() (by design of memzones). The 
exhaustion is rapid due to the number of FIFOs created (6).

If this would be right, we would propose and try to provide a patch as 
follows:

* Create a new rte_kni_init(unsigned int max_knis);

This would preallocate all the FIFO rings(TX, RX, ALLOC, FREE, Request 
and  Response)*max_knis by calling kni_memzone_reserve(), and store them 
in a kni_fifo_pool. This should only be called once by DPDK applications 
at bootstrapping time.

* rte_kni_allocate would just use one of the kni_fifo_pool (one => 
meaning a a set of 6 FIFOs making a single slot)
* rte_kni_release would return to the pool.

This should solve both issues. We would base the patch on 1.7.2.

Thoughts?
marc

p.s. Lately someone involved with DPDK said KNI would be deprecated in 
future DPDK releases; I haven't read or listen to this before, is this 
true? What would be the natural replacement then?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-23 20:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-23  9:27 [dpdk-dev] KNI and memzones Marc Sune
2014-09-23 12:39 ` Jay Rolette
2014-09-23 16:38   ` Zhou, Danny
2014-09-23 18:53     ` Jay Rolette
2014-09-23 19:12       ` Zhou, Danny
2014-09-23 19:24         ` Jay Rolette
2014-09-23 20:50     ` Marc Sune

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).