On Tue, Mar 9, 2021 at 12:50 PM Ferruh Yigit <ferruh.yi...@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.cz...@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. > > 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.