All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivano Cerrato <8002onavi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "dev-VfR2kkLFssw@public.gmane.org" <dev-VfR2kkLFssw@public.gmane.org>
Subject: KNI Out of memory
Date: Wed, 27 Aug 2014 10:40:48 +0200	[thread overview]
Message-ID: <53FD9990.4050709@gmail.com> (raw)

Hello,
I wrote a code that creates some KNI interfaces, destroys them when some 
management events occur, and creates new interfaces when other 
management events happen.
What happens is that I create a number of interfaces using "kni_alloc", 
I destroy ALL of them through "kni_release" and, when I try to create a 
new one I get the message "KNI out of memory" during the execution of 
the "kni_alloc".

The number of interfaces that I can create/destroy before getting the 
error depends on the size of the mempool that I specify during the 
creation of the interfaces themselves.
Then, to me it seems that the memory is not properly released when a KNI 
interface is destroyed. Before invoking "kni_release", I drain all the 
remaining mbufs in the tx queues. While checking the sources of DPDK, I 
have seen that indeed this trace only appears when there there are no 
mbufs available in the mempool.

Am I missing something here?  Is there any other call necessary to 
properly release a KNI interface?

Just before/after the creation and release of an interface, I print the 
values obtained by invoking "rte_mempool_count" and 
"rte_mempool_free_count" on the mempool used for the KNI. What I get is 
the following: the value obtained with "rte_mempool_count" tends to 
decrease, while the value get with "rte_mempool_free_count" tends to 
increase.

What is the exact semantic of "rte_mempool_count" and 
"rte_mempool_free_count"? From the doxygen documentation, it seems that 
the behaviour should be the opposite.

Best regards,

  Ivano

                 reply	other threads:[~2014-08-27  8:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FD9990.4050709@gmail.com \
    --to=8002onavi-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.