On 7/28/26 8:32 PM, Timothy Redaelli via dev wrote: > Split libopenvswitch into two libraries: > > - libopenvswitchutils: containers, utilities, I/O, threading, > logging, and OVSDB client modules. > - libopenvswitch: datapath, OpenFlow, netdev, dpif, flow, > conntrack, and related modules. > > Both libraries are installed. A shared convenience library > (libovsutil) is compiled once, then its objects are absorbed into > both installed libraries. This ensures identical compilation flags > for header-only code (hashes, atomics) in both libraries, addressing > the concern that divergent CFLAGS could produce different hash values. > > Programs that do not need datapath functionality now link only > libopenvswitchutils, reducing their dependency footprint: > ovsdb-server, ovsdb-client, ovsdb-tool, ovs-appctl, vtep-ctl, > test-lib. > > Programs that link libopenvswitch do not need to also link > libopenvswitchutils, since libopenvswitch already contains all > utils symbols through the convenience library.
While this is true that programs do not need to link both, there seems to be a problem when they do. For exmaple if an application is linked against the libopenvswitch, but a plugin for it is linked against the utils only. Both libraries carry the same functions including constructors, global lists and other things that can interfere with each other, e.g. two RCU threads or signal handlers. Nothing seems to protect from that to cause some issues. Is there a way around this? Can we make libopenvswitch to not absorb the utils, but link them? What are the downsides? > > USDT probe scripts updated to also search libopenvswitchutils > for struct definitions. > > Signed-off-by: Timothy Redaelli <[email protected]> > --- > NEWS | 6 + > configure.ac | 2 + > debian/rules | 4 +- > lib/.gitignore | 1 + > lib/automake.mk | 374 ++++++++++--------- > lib/libopenvswitchutils.pc.in | 11 + > lib/libopenvswitchutils.sym.in | 4 + > ovsdb/automake.mk | 6 +- > python/setup.py.template | 2 +- > tests/automake.mk | 6 +- > tests/oss-fuzz/automake.mk | 2 +- > tests/test-lib.c | 1 - > utilities/automake.mk | 2 +- > utilities/usdt-scripts/flow_reval_monitor.py | 1 + > utilities/usdt-scripts/reval_monitor.py | 4 +- > vtep/automake.mk | 2 +- > 16 files changed, 234 insertions(+), 194 deletions(-) > create mode 100644 lib/libopenvswitchutils.pc.in > create mode 100644 lib/libopenvswitchutils.sym.in > > diff --git a/NEWS b/NEWS > index 58bf25767..f09eb5d11 100644 > --- a/NEWS > +++ b/NEWS > @@ -4,6 +4,12 @@ Post-v4.0.0 > > v4.0.0 - xx xxx xxxx > -------------------- > + - The libopenvswitch library has been split into libopenvswitch (datapath, > + OpenFlow, netdev) and libopenvswitchutils (utilities, containers, I/O, > + OVSDB client). Programs that do not need the datapath functionality > + (e.g. ovsdb-server, ovsdb-client) now link only libopenvswitchutils. > + Address parsing and formatting functions have been moved from > packets.[ch] > + to netaddr.[ch] in the utils library. This should be in the post- section. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
