From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5] KNI: use a memzone pool for KNI alloc/release Date: Tue, 21 Oct 2014 17:35:51 +0200 Message-ID: <2520916.G2E1LsrgoZ@xps13> References: <1413888416-14814-1-git-send-email-marc.sune@bisdn.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Marc Sune Return-path: In-Reply-To: <1413888416-14814-1-git-send-email-marc.sune-kpkqNMk1I7M@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-10-21 12:46, Marc Sune: > The previous implementation of rte_kni_alloc() was allocating memzones with a > name composed of a fixed string and the interface name. When an application was > allocating and deallocating multiple interfaces with different names, memzones > were quickly exhausted, even though memzones from deallocated interfaces were > never used anymore (unless an interface with the same name was re-allocated). > As a result, the application was unable to allocate more KNI interfaces with > different names. > > This patch implements the KNI memzone pool in order to prevent memzone > exhaustion when allocating/deallocating KNI interfaces. It adds a new API call, > rte_kni_init(max_kni_ifaces) that shall be called before any call to > rte_kni_alloc() if KNI is used. The memzones are pre-allocated with interface- > independent names so that they can be reused. > > Signed-off-by: Marc Sune Previously acked by Helin. Applied Thanks -- Thomas