From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bilemail2.empirix.com (bilemail2.empirix.com [208.67.76.246]) by dpdk.org (Postfix) with ESMTP id 4865D5949 for ; Fri, 9 Oct 2015 12:14:04 +0200 (CEST) Received: from BILEMAIL1.empirix.com (10.17.8.30) by bilemail2.empirix.com (10.17.8.31) with Microsoft SMTP Server (TLS) id 15.0.775.38; Fri, 9 Oct 2015 06:13:44 -0400 Received: from BILEMAIL1.empirix.com ([fe80::f9e0:9293:2523:f021]) by bilemail1.empirix.com ([fe80::f9e0:9293:2523:f021%22]) with mapi id 15.00.0775.031; Fri, 9 Oct 2015 06:13:33 -0400 From: "Montorsi, Francesco" To: "Montorsi, Francesco" , Panu Matilainen , Thomas Monjalon Thread-Topic: [dpdk-dev] rte_eal_init() alternative? Thread-Index: AdDlfPBIBcvmYGE5S+iOMZ1NcwR9ugAI2wEAAAB5coAHDcC0gAAtFSkAAAURmZAACgLk8A== Date: Fri, 9 Oct 2015 10:13:32 +0000 Message-ID: <786931fdd268483eb6623389603dfbb6@bilemail1.empirix.com> References: <44e664970fef4bff942eaee5c7eaca67@bilemail1.empirix.com> <20150902125650.GA10364@bricha3-MOBL3> <3003120.8bdQ5bCz5C@xps13> <56177A00.9060201@redhat.com> <69ead0cc07ec49f884b92de0756de3df@bilemail1.empirix.com> In-Reply-To: <69ead0cc07ec49f884b92de0756de3df@bilemail1.empirix.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.50.106] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] rte_eal_init() alternative? 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: Fri, 09 Oct 2015 10:14:04 -0000 PiA+IEl0IHNlZW1z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