From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id AEF8B8E87 for ; Thu, 21 Jan 2016 07:15:40 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 20 Jan 2016 22:15:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,324,1449561600"; d="scan'208";a="895153653" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 20 Jan 2016 22:15:40 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 20 Jan 2016 22:15:38 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 20 Jan 2016 22:15:38 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.215]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.117]) with mapi id 14.03.0248.002; Thu, 21 Jan 2016 14:14:01 +0800 From: "Qiu, Michael" To: "Van Haaren, Harry" , "david.marchand@6wind.com" Thread-Topic: [dpdk-dev] [PATCH] eal: add function to check if primary proc alive Thread-Index: AQHRU4YjdEIiCFakoU645h1q4mhKnQ== Date: Thu, 21 Jan 2016 06:14:00 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E6028622F1E7EA@SHSMSX101.ccr.corp.intel.com> References: <1453296322-1210-1-git-send-email-harry.van.haaren@intel.com> 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 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] eal: add function to check if primary proc alive 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, 21 Jan 2016 06:15:41 -0000 On 1/20/2016 9:26 PM, Harry van Haaren wrote:=0A= > This patch adds a new function to the EAL API:=0A= > int rte_eal_primary_proc_alive(const char *path);=0A= >=0A= > The function indicates if a primary process is alive right now.=0A= > This functionality is implemented by testing for a write-=0A= > lock on the config file, and the function tests for a lock.=0A= >=0A= > The use case for this functionality is that a secondary=0A= > process can wait until a primary process starts by polling=0A= > the function and waiting. When the primary is running, the=0A= > secondary continues to poll to detect if the primary process=0A= > has quit unexpectedly, the secondary process can detect this.=0A= >=0A= > The RTE_MAGIC number is written to the shared config by the=0A= > primary process, this is the signal to the secondary process=0A= > that the EAL is set up, and ready to be used. The function=0A= > rte_eal_mcfg_complete() writes RTE_MAGIC. This has been=0A= > delayed in the EAL init proceedure, as the PCI probing in=0A= > the primary process can interfere with the secondary running.=0A= >=0A= > Signed-off-by: Harry van Haaren =0A= > ---=0A= =0A= one question:=0A= =0A= As we could start up many primaries, how does your secondary process=0A= work with them?=0A= =0A= Thanks,=0A= Michael=0A= =0A=