From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id A20B11BE99 for ; Tue, 3 Jul 2018 17:16:07 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2018 08:16:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,304,1526367600"; d="scan'208";a="68342504" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 03 Jul 2018 08:16:06 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 3 Jul 2018 08:16:06 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 3 Jul 2018 08:16:06 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.51]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.87]) with mapi id 14.03.0319.002; Tue, 3 Jul 2018 23:16:03 +0800 From: "Zhang, Qi Z" To: Thomas Monjalon CC: "dev@dpdk.org" , "Burakov, Anatoly" , "Ananyev, Konstantin" , "Richardson, Bruce" , "Yigit, Ferruh" , "Shelton, Benjamin H" , "Vangati, Narender" Thread-Topic: [dpdk-dev] [PATCH v8 02/19] eal: enable multi process init callback Thread-Index: AQHUEcfCcYYh8URWxEq1ktWm4RGmsaR8tnwAgADl0YA= Date: Tue, 3 Jul 2018 15:16:02 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153243598@SHSMSX103.ccr.corp.intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180702054450.29269-1-qi.z.zhang@intel.com> <20180702054450.29269-3-qi.z.zhang@intel.com> <3358274.MJj7BZBBQ7@xps> In-Reply-To: <3358274.MJj7BZBBQ7@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzZkZTc3M2EtNTc4Yy00ZjA4LWFjN2ItYmNkZWFjOWI0MGE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZ3lSK0tScWZXQmlNajlFcmR1N0RKSzM5NlJZK014Ukk3dTkzRkNqdm9raWV2SW9Kb1NhQmtjWWlvNnZnVkExeCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action 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 v8 02/19] eal: enable multi process init callback 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: Tue, 03 Jul 2018 15:16:08 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Tuesday, July 3, 2018 5:28 PM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Burakov, Anatoly ; Ananyev, > Konstantin ; Richardson, Bruce > ; Yigit, Ferruh ; She= lton, > Benjamin H ; Vangati, Narender > > Subject: Re: [dpdk-dev] [PATCH v8 02/19] eal: enable multi process init c= allback >=20 > Hi Qi, >=20 > Sorry I do not understand neither the commit log, nor the doxygen. > If it can help, consider your reader is in a bad mood and needs a pleasan= t > description. OK, I think is not a grammar issue since it almost passed a grammar check := ) So more explanation:=20 Basically we need to register mp action callback in ethdev layer, but this = should happens during rte_eal_init=20 ethdev don't have a general init function that can be invoked by eal during= rte_eal_init, actually I guess, all no-eal module don't have=20 in vdev bus, it register the mp action at the first bus scan happen. but in= ethdev, we can't do that way, because, we don' t know when device will be = attached or detached.=20 so we need that function to help register a callback function which will be= invoked during rte_eal_init. >=20 > 02/07/2018 07:44, Qi Zhang: > > Introduce new API rte_eal_register_mp_init that help to register a > > callback function which will be invoked right after multi-process > > channel be established (rte_mp_channel_init). Typically the API will > > be used by other module that want it's mp channel action callbacks can > > be registered during rte_eal_init automatically. > [...] > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > + * Register a callback function that will be invoked right after > > + * multi-process channel be established (rte_mp_channel_init). > > +Typically > > + * the function is used by other module that want it's mp channel > > + * action callbacks can be registered during rte_eal_init automaticall= y. > > + * > > + * @note > > + * This function only take effect when be called before rte_eal_init= , > > + * and all registered callback will be clear during rte_eal_cleanup. > > + * > > + * @param callback > > + * function be called at that moment. > > + * > > + * @return > > + * - 0 on success. > > + * - (<0) on failure. > > + */ > > +int __rte_experimental > > +rte_eal_register_mp_init(rte_eal_mp_init_callback_t callback); >=20 > It looks the prefix of this function should be rte_mp_ OK, will fix. Regards Qi >=20