From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0069.outbound.protection.outlook.com [104.47.33.69]) by dpdk.org (Postfix) with ESMTP id 69E8C37AC for ; Thu, 28 Jul 2016 11:36:35 +0200 (CEST) Received: from DM2PR03CA0010.namprd03.prod.outlook.com (10.141.96.20) by BN3PR03MB2290.namprd03.prod.outlook.com (10.166.74.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Thu, 28 Jul 2016 09:36:32 +0000 Received: from BN1AFFO11FD019.protection.gbl (2a01:111:f400:7c10::144) by DM2PR03CA0010.outlook.office365.com (2a01:111:e400:2428::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15 via Frontend Transport; Thu, 28 Jul 2016 09:36:33 +0000 Authentication-Results: spf=temperror (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; rehivetech.com; dkim=none (message not signed) header.d=none;rehivetech.com; dmarc=temperror action=none header.from=nxp.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of nxp.com: DNS Timeout) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD019.mail.protection.outlook.com (10.58.52.79) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.549.5 via Frontend Transport; Thu, 28 Jul 2016 09:36:21 +0000 Received: from [10.232.14.199] (Tophie.ap.freescale.net [10.232.14.199]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u6S9Z57H029650; Thu, 28 Jul 2016 02:35:06 -0700 To: Jan Viktorin References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1468303282-2806-1-git-send-email-shreyansh.jain@nxp.com> <1468303282-2806-6-git-send-email-shreyansh.jain@nxp.com> <20160713112043.2fd847ca@jvn> <20160713193430.65b6df9c@jvn> <578722DB.3030900@nxp.com> <20160714175707.43755987@jvn> <5788BF88.3060607@nxp.com> CC: , , From: Shreyansh Jain Message-ID: <5799D20A.4020804@nxp.com> Date: Thu, 28 Jul 2016 15:06:10 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <5788BF88.3060607@nxp.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131141721898818941; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(24454002)(377454003)(189002)(199003)(356003)(4326007)(305945005)(97736004)(65806001)(7846002)(19580395003)(110136002)(2906002)(8936002)(68736007)(65956001)(50466002)(83506001)(77096005)(81156014)(2950100001)(4001350100001)(15975445007)(64126003)(36756003)(92566002)(189998001)(81166006)(47776003)(8676002)(54356999)(65816999)(87266999)(76176999)(50986999)(87936001)(59896002)(19580405001)(80316001)(23746002)(586003)(33656002)(93886004)(104016004)(15395725005)(86362001)(230700001)(105606002)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2290; H:tx30smr01.am.freescale.net; FPR:; SPF:TempError; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD019; 1:iO4RWI2x1Nk5xp1fuEeqc6tAirdqsBwXIdDOUefVKgoERtFGv4y0AnVDL+zb59Qof1jl1AY7RkX2fZyNYqr7yOjx0SfewO3UQSoHBQxuiDKW1j2YNCTDT/Bn5wcVnddtWEdI6uXnuERV18h1YhHhWazjgUPxTgwmpF8N+z9IUabxQtz3MlzFOHmO90b48H58BkaS/o6KQHIFSMP/NgA7xti3YYPG2+u5UU0NjXrXp2jKJ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GCCA5Q== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13017025)(13018025)(13023025)(13024025)(13015025)(3002001)(10201501046)(6055026); SRVR:BN3PR03MB2290; BCL:0; PCL:0; RULEID:(400006); SRVR:BN3PR03MB2290; X-Forefront-PRVS: 00179089FD X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN3PR03MB2290; 23:8SQqvKKjD4xj2fruekwhlj3C8m52f3ey7O75+?= =?Windows-1252?Q?2NbAvdHOjoQtldqEldncQueDJqJekqmdyjsHijO7yeuz8WP6YTj/4ufL?= =?Windows-1252?Q?YkTxf7UxkwfebuOPn4OczNMOSqBfZbpJ8s4CL+vMV4Rv3+RiFkN8J8FK?= =?Windows-1252?Q?xaolkTP3wP+XzJhyddx5BqZiWcfRoHwq45ZG/vYAtaCBv0pc2P83yrjn?= =?Windows-1252?Q?grmiKWO/7zBWT2/ZimN+JtXtz7xHTj3cO0rsEutyUVfrAr4L29p7/Mo7?= =?Windows-1252?Q?GMj9M9nFzE/5Zrtv9Gsa6NHGDxr+gag6Wc6WESiBZ5pykiyam56lzdQj?= =?Windows-1252?Q?JbPs9T+hkX/erewrqRDxhgJhOyQhwp3tcGoaNC2FpcCo2cPlsQCH6Atz?= =?Windows-1252?Q?rGUFKRQgv9KtneP51W4uawD+LibYgnZmezTT8kFSN23vaaBpkAIo+oUM?= =?Windows-1252?Q?VBs+iyX3WHQ/Q9AKcsK7aqFv7+WyBh8GqS+os8o7cu/RV+FBehtzVfXB?= =?Windows-1252?Q?dxjbdbKoKGLdy4u1Wi9AynXtH+z4wNNLtznGzbcyJO2Ztn+62aXfPk0z?= =?Windows-1252?Q?5tcq9yvZxzsw3wWNYSJ2APuWn00jHwsg7NyvEbWOGaZai5hjhQQYb4Mj?= =?Windows-1252?Q?EKu+Cj9OtTuJSvfqSQ8pHjdajecuVipiL72yqMV1bTdYa0F4q3XUOwvB?= =?Windows-1252?Q?r8gIgawazyxG93I+dRdxWMIfh60mYcqg0yL5GptuBvVQzpakMLy70iG3?= =?Windows-1252?Q?LM0QyFRGax/BDYDOczW1nspaQA4FYG9dYvPO0xK5KUaPr+3cqbbYODQH?= =?Windows-1252?Q?NroieiRWMsnWtSSSqC4CF9u7dHPsvFbCFNW3YWdNwAodZQvDhiTkmCLJ?= =?Windows-1252?Q?rh2YyfW4Jy2dBY01Z2o5pNM2jcAGRePfNcZlA9wrt+6vluLBqvCgJ+h6?= =?Windows-1252?Q?wFOo2EKoQmtigxlcE6bt+v6Xr3ksfbfqgQlhZhfPLSD5jwWX1bVzQR9e?= =?Windows-1252?Q?dRnRDld6GoppKFo1ZT8/BLLqcFHXl71aSfnEmb/SMbvGcuWElk4NLjLG?= =?Windows-1252?Q?VkFHX1uhlG1rLS1MesnX8nFoV4KAlloYLL/IJdpk1+YMZDde3pt6UdCC?= =?Windows-1252?Q?HnxFAHRLwGafAcRS2Wqs9SqQ6PMgjzfP4kdoq0GBw6E3bYKlIgpzI1U7?= =?Windows-1252?Q?4QNXE8pY7L6ZvRC7uX4L33wiLAlzNq2QoJkMjQrq0OF0OPB9hgT4WTF2?= =?Windows-1252?Q?+5C6MahOAdSUGUxHakX/mqWY1+p4qS5/6NHdNWc4zeVjxxkZHwVxlUn+?= =?Windows-1252?Q?9nS21CBp3oiu4GpvLaMvy4BoPcW4OR6cHctKttleezZhYkfwmiCPeADj?= =?Windows-1252?Q?pg417oRIPpx?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2290; 6:XZPD+A4PkXOy/OIFJNr7mnivPO/3/135IwI/MGOHgPDl2pQpFvlR6gxpujY7Kdmpv8OxNpveA6X8rEhdez8Yyrt6xb4zCElb/PyIgxO1wL6PJWvA2wYFjm6Y+ka6k5x8hSbG5fX/ZS5BVshWbvAVwXithJRozAakT5XPcGDOJ8O2mmwJyTytgkOLoY4WE+RvmOGIyH6v3lVVvhlKWa3UbMgoQxmU05YTIeEp0X+5h51LjDyuZts7pMoBPUQH16UNl4wYbx/FNzCxx/PT6PJsWE2LNmsNMLbcvMmTBCxZ+rY=; 5:Wcs4dQhKmn9a1WLw5D+YrsWdbufq9LxsRGP7Mck2xDSUPlWYESEFBB5FcKN/6F+u4zyjmdffTIVbymqW4SLRSlMEIO1AzSq2NSsiGYH/Q74J25+rB1SjEQ8w96QIzTNpjKsamg6pXVZAbYYB6kXsFx/iTmG8p7j0J48kBu2+4GQ=; 24:EsxwnzOq21E6KhcZiNXqXKKLorhOeJZ8/jpvdhg3X0uvdJiKdvQKNnlSD7aKvhWc9FIehIod74YfmjKLAuQKW4jYPv4fAK2gofhZYqEyq1s=; 7:5bArd3YLaa5KmTe1y+EDKUnFmu85vIkLYgiHxuZzGm+29GXyuNovLlgKTyOPo6OtgC7ct7EE7bbc+Kc4Jp48GboQK9cyKGy95nksI9tA0cRAZM7oX2UEUBg10fZGZnAUSD8S/X5Lo0E/3Lrzl2dMY3aAn1SFdd0TeE+O+XY7BRpRcgFNYFNiOaeQBnYtqkz/FIOyi8CcuonsoRntwqlwAZRXEefJG0UgZaLWk7MIvNyepBnc1dY4lJI9mxDSrAtu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2016 09:36:21.0689 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2290 Subject: Re: [dpdk-dev] [PATCH v6 05/17] eal: introduce init macros 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, 28 Jul 2016 09:36:35 -0000 Hi Jan, On Friday 15 July 2016 04:18 PM, Shreyansh jain wrote: > On Thursday 14 July 2016 09:27 PM, Jan Viktorin wrote: >> On Thu, 14 Jul 2016 10:57:55 +0530 >> Shreyansh jain wrote: >> >>> Hi Jan, >>> >>> On Wednesday 13 July 2016 11:04 PM, Jan Viktorin wrote: >>>> On Wed, 13 Jul 2016 11:20:43 +0200 >>>> Jan Viktorin wrote: >>>> >>>>> Hello Shreyansh, >>>>> >>>>> On Tue, 12 Jul 2016 11:31:10 +0530 >>>>> Shreyansh Jain wrote: >>>>> >>>>>> Introduce a RTE_INIT macro used to mark an init function as a constructor. >>>>>> Current eal macros have been converted to use this (no functional impact). >>>>>> DRIVER_REGISTER_PCI is added as a helper for pci drivers. >>>>>> >>>>>> Suggested-by: Jan Viktorin >>>>>> Signed-off-by: David Marchand >>>>>> Signed-off-by: Shreyansh Jain >>>>>> --- >>>>> >>>>> [...] >>>>> >>>>>> +#define RTE_INIT(func) \ >>>>>> +static void __attribute__((constructor, used)) func(void) >>>>>> + >>>>>> #ifdef __cplusplus >>>>>> } >>>>>> #endif >>>>>> diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h >>>>>> index fa74962..3027adf 100644 >>>>>> --- a/lib/librte_eal/common/include/rte_pci.h >>>>>> +++ b/lib/librte_eal/common/include/rte_pci.h >>>>>> @@ -470,6 +470,14 @@ void rte_eal_pci_dump(FILE *f); >>>>>> */ >>>>>> void rte_eal_pci_register(struct rte_pci_driver *driver); >>>>>> >>>>>> +/** Helper for PCI device registeration from driver (eth, crypto) instance */ >>>>>> +#define DRIVER_REGISTER_PCI(nm, drv) \ >>>>>> +RTE_INIT(pciinitfn_ ##nm); \ >>>>>> +static void pciinitfn_ ##nm(void) \ >>>>>> +{ \ >>>>> >>>>> You are missing setting the name here like PMD_REGISTER_DRIVER does >>>>> now. Or should I include it in my patch set? >>>>> >>>>> (drv).name = RTE_STR(nm); >>> >>> That is a miss from my side. >>> I will publish v7 with this. You want this right away or should I wait a little while (more reviews, or any pending additions as per Thomas's notes) before publishing? >> >> Please. The time is almost gone. 18/7/2016 is the release (according >> to the roadmap)... I have to fix it in my patchset, otherwise it >> does not build (after moving the .name from rte_pci_driver to >> rte_driver). >> > > I didn't consider 18/Jul. > Please go ahead. I will continue to send v7 _without_ the above change so that your patchset doesn't break. This way you will not get blocked because of me. > Now that we have already skipped the 16.07, I will fix this in my code and release an updated version as soon as 16.07 is officially available. Is that OK? Also, I have fixed most review comments except [1]. I am still not sure of the impact of this change. So, I will publish the v7 without this and then probably a v8 in case this change has any impact. That way we can have your patchset not blocked because of this series. [1] http://dpdk.org/ml/archives/dev/2016-July/044004.html [...] - Shreyansh