From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id EF7F54C9C for ; Wed, 28 Feb 2018 03:12:50 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 18:12:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,403,1515484800"; d="scan'208";a="23763280" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga002.fm.intel.com with ESMTP; 27 Feb 2018 18:12:49 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Feb 2018 18:12:49 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Feb 2018 18:12:49 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Wed, 28 Feb 2018 10:12:47 +0800 From: "Tan, Jianfeng" To: "Burakov, Anatoly" , "dev@dpdk.org" Thread-Topic: [PATCH v3 1/5] eal: add internal flag indicating init has completed Thread-Index: AQHTr9hI0c5hLZSxcES9KhnzcM+idqO5Ek1Q Date: Wed, 28 Feb 2018 02:12:47 +0000 Message-ID: References: <31f6d9ef676fb1eb0a664c06d62d66f32876dcb6.1519672713.git.anatoly.burakov@intel.com> <3f4fab71b0d17fb9d0b15e3634f4fe7d12dd3e92.1519740527.git.anatoly.burakov@intel.com> In-Reply-To: <3f4fab71b0d17fb9d0b15e3634f4fe7d12dd3e92.1519740527.git.anatoly.burakov@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 Subject: Re: [dpdk-dev] [PATCH v3 1/5] eal: add internal flag indicating init has completed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 02:12:51 -0000 Hi Anatoly, > -----Original Message----- > From: Burakov, Anatoly > Sent: Tuesday, February 27, 2018 10:36 PM > To: dev@dpdk.org > Cc: Tan, Jianfeng > Subject: [PATCH v3 1/5] eal: add internal flag indicating init has comple= ted >=20 > Currently, primary process initialization is finalized by setting > the RTE_MAGIC value in the shared config. However, it is not > possible to check whether secondary process initialization has > completed. Add such a value to internal config. A nit: "check whether secondary process initialization has completed" sounds like = checking comes from another process. Does it look better, "check whether initialization has completed in seconda= ry process"? >=20 > Signed-off-by: Anatoly Burakov Reviewed-by: Jianfeng Tan Thanks, Jianfeng > --- >=20 > Notes: > This patch is dependent upon earlier IPC fixes patchset [1]. >=20 > [1] http://dpdk.org/dev/patchwork/bundle/aburakov/IPC_Fixes/ >=20 > v3: no changes >=20 > v2: no changes >=20 > lib/librte_eal/common/eal_common_options.c | 1 + > lib/librte_eal/common/eal_internal_cfg.h | 2 ++ > lib/librte_eal/linuxapp/eal/eal.c | 2 ++ > 3 files changed, 5 insertions(+) >=20 > diff --git a/lib/librte_eal/common/eal_common_options.c > b/lib/librte_eal/common/eal_common_options.c > index 9f2f8d2..0be80cb 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -194,6 +194,7 @@ eal_reset_internal_config(struct internal_config > *internal_cfg) > internal_cfg->vmware_tsc_map =3D 0; > internal_cfg->create_uio_dev =3D 0; > internal_cfg->user_mbuf_pool_ops_name =3D NULL; > + internal_cfg->init_complete =3D 0; > } >=20 > static int > diff --git a/lib/librte_eal/common/eal_internal_cfg.h > b/lib/librte_eal/common/eal_internal_cfg.h > index 1169fcc..4e2c2e6 100644 > --- a/lib/librte_eal/common/eal_internal_cfg.h > +++ b/lib/librte_eal/common/eal_internal_cfg.h > @@ -56,6 +56,8 @@ struct internal_config { > /**< user defined mbuf pool ops name */ > unsigned num_hugepage_sizes; /**< how many sizes on this > system */ > struct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES]; > + unsigned int init_complete; > + /**< indicates whether EAL has completed initialization */ > }; > extern struct internal_config internal_config; /**< Global EAL configura= tion. > */ >=20 > diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/= eal/eal.c > index 38306bf..2ecd07b 100644 > --- a/lib/librte_eal/linuxapp/eal/eal.c > +++ b/lib/librte_eal/linuxapp/eal/eal.c > @@ -669,6 +669,8 @@ rte_eal_mcfg_complete(void) > /* ALL shared mem_config related INIT DONE */ > if (rte_config.process_type =3D=3D RTE_PROC_PRIMARY) > rte_config.mem_config->magic =3D RTE_MAGIC; > + > + internal_config.init_complete =3D 1; > } >=20 > /* > -- > 2.7.4