> From: Bruce Richardson [mailto:bruce.richard...@intel.com] > Sent: Wednesday, 18 June 2025 12.28 > > On Wed, Jun 18, 2025 at 11:47:13AM +0200, Thomas Monjalon wrote: > > 18/06/2025 09:16, Morten Brørup: > > > > diff --git a/lib/meson.build b/lib/meson.build > > > > index 1934cb4a29..87b567f01b 100644 > > > > --- a/lib/meson.build > > > > +++ b/lib/meson.build > > > > @@ -13,7 +13,7 @@ libraries = [ > > > > 'kvargs', # eal depends on kvargs > > > > 'argparse', > > > > 'telemetry', # basic info querying > > > > - 'pmu', > > > > + 'pmu', # trace depends on pmu > > > > 'eal', # everything depends on eal > > > > 'ptr_compress', > > > > 'ring', > > > > > > @Tomasz, > > > > > > Please re-read my v1 review feedback [1]: > > > The PMU library should depend on the EAL, not the other way around! > > > > It should depend on the low-level EAL, yes. > > But as of now, EAL is not split so it is better to avoid EAL dependency if > possible. > > > > > How else is the PMU library supposed to use EAL functions like > rte_mem_page_size()? > > > > > > @Jerin or @Bruce, do any of you have some suggestions for how to achieve > the proper dependency chain here? > > > > I propose we don't use rte_mem_page_size() in PMU lib for now, > > so we keep not depending on EAL, to avoid mixing all in future. > > Later we could fix it if we manage to have high level EAL as a separate > library. > > > For cases where we only need a single small function or snippet, there is > no problem with circular dependencies if it can be made an inline function > in a header file. We just need to add the appropriate include path to the > build of the PMU library to pick up any EAL headers with inlines.
Thanks for the suggestion, Bruce. For the next version of my patch [2], I will consider if inlining the function is viable. It's an O/S dependent function, so it might be too ugly putting it in a header file. We'll see. [2]: https://patchwork.dpdk.org/project/dpdk/patch/20250612140657.313785-1...@smartsharesystems.com/