[dpdk-dev] [PATCH v6 05/17] eal: introduce init macros
Shreyansh Jain
shreyansh.jain at nxp.com
Thu Jul 28 11:36:10 CEST 2016
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 <shreyansh.jain at nxp.com> 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 <viktorin at rehivetech.com> wrote:
>>>>
>>>>> Hello Shreyansh,
>>>>>
>>>>> On Tue, 12 Jul 2016 11:31:10 +0530
>>>>> Shreyansh Jain <shreyansh.jain at nxp.com> 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 <viktorin at rehivetech.com>
>>>>>> Signed-off-by: David Marchand <david.marchand at 6wind.com>
>>>>>> Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com>
>>>>>> ---
>>>>>
>>>>> [...]
>>>>>
>>>>>> +#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
More information about the dev
mailing list