DPDK patches and discussions
 help / color / mirror / Atom feed
* DPDK libs as one big shared object
@ 2025-06-16 16:14 Morten Brørup
  2025-06-18  7:39 ` Morten Brørup
  0 siblings, 1 reply; 3+ messages in thread
From: Morten Brørup @ 2025-06-16 16:14 UTC (permalink / raw)
  To: dev; +Cc: techboard

Why are we still building one .so file per DPDK library, instead of just building one big dpdk.so for all DPDK libraries?
I think it's legacy from when DPDK libraries were versioned individually, and thus not relevant anymore.

Wouldn't building one big dpdk.so eliminate the problems with circular dependencies between DPDK libraries?

-Morten


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: DPDK libs as one big shared object
  2025-06-16 16:14 DPDK libs as one big shared object Morten Brørup
@ 2025-06-18  7:39 ` Morten Brørup
  2025-06-18 10:01   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Morten Brørup @ 2025-06-18  7:39 UTC (permalink / raw)
  To: dev, techboard; +Cc: Tomasz Duszynski

> Why are we still building one .so file per DPDK library, instead of just
> building one big dpdk.so for all DPDK libraries?
> I think it's legacy from when DPDK libraries were versioned individually, and
> thus not relevant anymore.
> 
> Wouldn't building one big dpdk.so eliminate the problems with circular
> dependencies between DPDK libraries?

Obviously, the source code should remain organized as individual directories per library.
I'm only suggesting linking them all into one object, so any DPDK lib can call any function in any other DPDK lib.

Perhaps only the core libs or always_enable libs should be linked into one object.

Here's an example benefit:
I'm currently trying to convince the PMU lib author to make PMU depend on EAL [1], so missing error handling of sysconf(_SC_PAGESIZE) can be in the EAL for all uses, instead of copy-pasting sysconf(_SC_PAGESIZE) error handling to everywhere it is used.
But this is difficult with the dependency chain for the patch adding PMU to Trace: Trace depends on PMU, and EAL depends on Trace, therefore EAL depends on PMU.

[1]: https://inbox.dpdk.org/dev/98CBD80474FA8B44BF855DF32C47DC35E9FD08@smartserver.smartshare.dk/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DPDK libs as one big shared object
  2025-06-18  7:39 ` Morten Brørup
@ 2025-06-18 10:01   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2025-06-18 10:01 UTC (permalink / raw)
  To: Morten Brørup; +Cc: dev, techboard, Tomasz Duszynski

18/06/2025 09:39, Morten Brørup:
> > Why are we still building one .so file per DPDK library, instead of just
> > building one big dpdk.so for all DPDK libraries?
> > I think it's legacy from when DPDK libraries were versioned individually, and
> > thus not relevant anymore.

I think it helps with selective packaging.


> > Wouldn't building one big dpdk.so eliminate the problems with circular
> > dependencies between DPDK libraries?
> 
> Obviously, the source code should remain organized as individual directories per library.
> I'm only suggesting linking them all into one object, so any DPDK lib can call any function in any other DPDK lib.
> 
> Perhaps only the core libs or always_enable libs should be linked into one object.
> 
> Here's an example benefit:
> I'm currently trying to convince the PMU lib author to make PMU depend on EAL [1], so missing error handling of sysconf(_SC_PAGESIZE) can be in the EAL for all uses, instead of copy-pasting sysconf(_SC_PAGESIZE) error handling to everywhere it is used.
> But this is difficult with the dependency chain for the patch adding PMU to Trace: Trace depends on PMU, and EAL depends on Trace, therefore EAL depends on PMU.
> 
> [1]: https://inbox.dpdk.org/dev/98CBD80474FA8B44BF855DF32C47DC35E9FD08@smartserver.smartshare.dk/

I don't see a problem to copy-paste in the few libs not depending on EAL.

The real solution for EAL dependencies is to split it more.
The malloc, init & logic part should be in separate libraries,
depending on the real low-level EAL.

Then all libs could depend on the low-level EAL,
and avoid copy-pasting.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-18 10:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-16 16:14 DPDK libs as one big shared object Morten Brørup
2025-06-18  7:39 ` Morten Brørup
2025-06-18 10:01   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).