From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id 89A6E7E99 for ; Tue, 21 Oct 2014 17:27:57 +0200 (CEST) Received: by mail-wi0-f173.google.com with SMTP id fb4so10460353wid.6 for ; Tue, 21 Oct 2014 08:36:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=47f8af+W7uEGlvACpuVvO/JnXlmp7Opl3CIEIyQaAkg=; b=dLTviaLs1RDfIqZYx3MeILoG0vQ3grQz6uDWs2oo5k6f7/eYLRCqGpFl/FvPS8rLv+ WE5yunK4hoKo8yF4cTjyKYaPnoUva6N1qK+R7xB96laMiufyJ42wiN+BCdnVXmQ0gAt2 0kYfmivEe8Xo2GbbhiDn36gREni6beCkZLRTcm6MnftuCQNERNjWOcnj/CeGeMkGYXtI ZouMmDO4tpFIoIgsQTwSmeXPwm3B98LR24tTSnFSH3ynLZHwdMgLUPLncwotvBslTmQJ nm0h6lxacl6OXLgqJdS54Qn1mkgZoQbX/gqKqJ06hUXt/fq8yvfePKDDBKJJR9QzNxos mQ7w== X-Gm-Message-State: ALoCoQmrSP49Pw3Aw/2HV7Puqdh6uTqOQYeW7vz2CN3b9v42/dSIAqMj3ylTooOuPdYnMArIioYS X-Received: by 10.180.212.78 with SMTP id ni14mr29838397wic.2.1413905771297; Tue, 21 Oct 2014 08:36:11 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id xw9sm15743050wjc.24.2014.10.21.08.36.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Oct 2014 08:36:10 -0700 (PDT) From: Thomas Monjalon To: Marc Sune Date: Tue, 21 Oct 2014 17:35:51 +0200 Message-ID: <2520916.G2E1LsrgoZ@xps13> Organization: 6WIND User-Agent: KMail/4.14.1 (Linux/3.16.4-1-ARCH; KDE/4.14.1; x86_64; ; ) In-Reply-To: <1413888416-14814-1-git-send-email-marc.sune@bisdn.de> References: <1413888416-14814-1-git-send-email-marc.sune@bisdn.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5] KNI: use a memzone pool for KNI alloc/release X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2014 15:27:57 -0000 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