From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <helin.zhang@intel.com>
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by dpdk.org (Postfix) with ESMTP id 7027F7E7A
 for <dev@dpdk.org>; Tue, 21 Oct 2014 06:51:13 +0200 (CEST)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by orsmga103.jf.intel.com with ESMTP; 20 Oct 2014 21:56:11 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.04,760,1406617200"; d="scan'208";a="622335824"
Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82])
 by orsmga002.jf.intel.com with ESMTP; 20 Oct 2014 21:59:25 -0700
Received: from pgsmsx104.gar.corp.intel.com (10.221.44.91) by
 PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Tue, 21 Oct 2014 12:57:42 +0800
Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by
 PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Tue, 21 Oct 2014 12:57:41 +0800
Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.174]) by
 SHSMSX152.ccr.corp.intel.com ([169.254.6.13]) with mapi id 14.03.0195.001;
 Tue, 21 Oct 2014 12:57:40 +0800
From: "Zhang, Helin" <helin.zhang@intel.com>
To: Marc Sune <marc.sune@bisdn.de>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH v4] KNI: use a memzone pool for KNI
 alloc/release
Thread-Index: AQHP6l0Aa4HVlw1+tEWiMr/lPyXOmpw6Ag5Q
Date: Tue, 21 Oct 2014 04:57:39 +0000
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A7A842E@SHSMSX104.ccr.corp.intel.com>
References: <1413586289-6694-1-git-send-email-marc.sune@bisdn.de>
In-Reply-To: <1413586289-6694-1-git-send-email-marc.sune@bisdn.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v4] 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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 21 Oct 2014 04:51:14 -0000

> This patch implements the KNI memzone pool in order to prevent memzone
> exhaustion when allocating/deallocating KNI interfaces.
>=20
> 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.
>=20
> v2: Moved KNI fd opening to rte_kni_init(). Revised style.
> v3: Adapted kni examples/tests to rte_kni_init().
> v4: Improved example integration. Fixed kni_memzone_pool_alloc/release()
> bug.
>=20
> Signed-off-by: Marc Sune <marc.sune@bisdn.de>

Acked-by: Helin Zhang <helin.zhang@intel.com>

> ---
>  app/test/test_kni.c      |    5 +-
>  examples/kni/main.c      |   22 ++++
>  lib/librte_kni/rte_kni.c |  317
> +++++++++++++++++++++++++++++++++++++---------
>  lib/librte_kni/rte_kni.h |   18 +++
>  4 files changed, 302 insertions(+), 60 deletions(-)