[dpdk-dev] [PATCH v4 4/6] net/ark: cleanup ark dynamic extension interface

Ferruh Yigit ferruh.yigit at intel.com
Wed Mar 10 17:29:02 CET 2021


On 3/10/2021 3:11 PM, Ed Czeck wrote:
> On Tue, Mar 9, 2021 at 12:50 PM Ferruh Yigit <ferruh.yigit at intel.com> wrote:
>>
>> On 3/9/2021 4:08 PM, Ed Czeck wrote:
>>> - Rename extension functions with rte_pmd_ark prefix
>>> - Move extension prototype to rte_pmd_ark.h
>>> - Update local function documentation
>>>
>>> Signed-off-by: Ed Czeck <ed.czeck at atomicrules.com>
>>> ---
>>> v3:
>>> - split function rename from previous commit
>>> v4:
>>> - reorder patches renaming before adding
>>
>> <...>
>>
>>> diff --git a/drivers/net/ark/rte_pmd_ark.h b/drivers/net/ark/rte_pmd_ark.h
>>> index 6f26d66b1..0f24a347d 100644
>>> --- a/drivers/net/ark/rte_pmd_ark.h
>>> +++ b/drivers/net/ark/rte_pmd_ark.h
>>> @@ -1,18 +1,24 @@
>>>    /* SPDX-License-Identifier: BSD-3-Clause
>>> - * Copyright (c) 2020 Atomic Rules LLC
>>> + * Copyright (c) 2020-2021 Atomic Rules LLC
>>>     */
>>>
>>>    #ifndef RTE_PMD_ARK_H
>>>    #define RTE_PMD_ARK_H
>>>
>>> +#include <rte_mbuf.h>
>>> +#include <rte_mbuf_dyn.h>
>>> +
>>> +#include <stdint.h>
>>> +struct rte_eth_dev;
>>> +struct rte_mbuf;
>>> +struct rte_ether_addr;
>>> +struct rte_eth_stats;
>>> +
>>
>> Is the declaring structures instead of including header preferred intentionally?
>>
>> I guess both works, and it may not differ for the PMD at all, but for the
>> extension developer that is including this header, it may need to include
>> required headers again, this header including all required headers and be a self
>> contained may help extension code, up to you.
> 
> My experience/style has been to use a declaration rather than a full include to
> avoid include bloat and speed up compiles.  If the extension developer needs
> the declaration in the header, they can include it as needed.
> 

OK.

>>
>> Plus just a detail but I guess mbuf struct is redundant for this patch, it can
>> be added in next patch where mbufs header removed and hooks added.
> 
> Agreed.  Would you like another patch?
> 
> Thanks
> Ed.
> 



More information about the dev mailing list