From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by dpdk.org (Postfix) with ESMTP id 29A38678B for ; Thu, 17 Apr 2014 11:44:41 +0200 (CEST) Received: by mail-we0-f171.google.com with SMTP id t61so203853wes.2 for ; Thu, 17 Apr 2014 02:44:41 -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=HV7f/PFlthzav1BDdj5kCPFSyESW0Xu827uK3diXYwU=; b=mXN4R9vKY/dYLyPQuDCyqqQQssC0QbG/FixgfDhTVwQo5VC0/Eqe2quynePPiWIxFI B5RaW8pq0BNbG6ZyPDi3oENwHuxTHC90TqvtkjhpoVhdx6w2bgmBxe4JRm5B2NmDAZZV yNN3x/FqmxsvfqL1Hp3PD7SyC1uqtbdUk7tnhv8jASuRCX5WRSvT4DniXgbkHd66dkbA Qekh6AfNNxCPbmnFGBOIJVoO5Qo8k4pjxG0UPTEMX1Yxw8kiKKnTvCj0x0U9i7a7q7Uu ARa9GwvAHoWN5LQ4tbMgfWDE1Dnvo6NDsJRMUMRh/xsA60PtgKoB9GK5uH0xXnBPhRgs d5KA== X-Gm-Message-State: ALoCoQnBYhyY6O0jQsTzY0OUUwhjRpbwRnUz4Z9K43Wo1EC5klOe3+OUS0+KUm/4s6/7GyXCtA8h X-Received: by 10.180.24.72 with SMTP id s8mr23330595wif.20.1397727881745; Thu, 17 Apr 2014 02:44:41 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id hm5sm38263987wjc.17.2014.04.17.02.44.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Apr 2014 02:44:41 -0700 (PDT) From: Thomas Monjalon To: Tomas Vestelind Date: Thu, 17 Apr 2014 11:44:40 +0200 Message-ID: <2816958.o6HntAG0VO@xps13> Organization: 6WIND User-Agent: KMail/4.12.4 (Linux/3.14.1-1-ARCH; KDE/4.12.4; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Calling rte_eal_init multiple times in the same process 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: Thu, 17 Apr 2014 09:44:41 -0000 Hello, 2014-04-17 09:09, Tomas Vestelind: > The problem I'm facing is that I need to do rte_eal_init serveral times in > the same process. The reason for this is mostly architectural as we want to > divide certain functionality in to different, implementation independent, > modules in which DPDK would be used for different purposes. Thus we would > need to eventually call rte_eal_init several times because we can't say for > sure if it has been called by another module or not. > > While thinking about it I saw no good, existing solution to this (I might > have missed it though). Would returning a "DPDK has already been > initialized" error code in rte_eal_init be a good way to go about it? I > haven't done this yet but I could probably provide a patch if it's > interesting. Don't hesitate to submit a patch. It's far easier to discuss on a patch basis. If your patch fill your need and nobody complains about it, it will be accepted. -- Thomas