@@ -3,6 +3,13 @@ Post-v4.0.0
- ovs-vswitchd:
* Mirror filters now accept masked fields, e.g. "ip,nw_src=10.0.0.0/24"
in the "filter" column of the Mirror table.
+ - 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. Programs that link
+ libopenvswitch must now also link libopenvswitchutils.
v4.0.0 - 17 Aug 2026
@@ -149,6 +149,7 @@ AC_CONFIG_FILES([
ofproto/libofproto.sym
lib/libsflow.sym
lib/libopenvswitch.sym
+ lib/libopenvswitchutils.sym
vtep/libvtep.sym])
OVS_ENABLE_OPTION([-Wall])
@@ -204,6 +205,7 @@ AC_SUBST([OVS_LDFLAGS])
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(tests/atlocal)
AC_CONFIG_FILES(lib/libopenvswitch.pc)
+AC_CONFIG_FILES(lib/libopenvswitchutils.pc)
AC_CONFIG_FILES(lib/libsflow.pc)
AC_CONFIG_FILES(ofproto/libofproto.pc)
AC_CONFIG_FILES(ovsdb/libovsdb.pc)
@@ -88,8 +88,8 @@ pybuild = \
export PKG_CONFIG_SYSTEM_INCLUDE_PATH=/; \
export PKG_CONFIG_SYSTEM_LIBRARY_PATH=/; \
enable_shared=no \
- extra_cflags="`pkg-config --cflags libopenvswitch`" \
- extra_libs="-Wl,-Bstatic -lopenvswitch -Wl,-Bdynamic `pkg-config --libs --static libopenvswitch`" \
+ extra_cflags="`pkg-config --cflags libopenvswitchutils`" \
+ extra_libs="-Wl,-Bstatic -lopenvswitchutils -Wl,-Bdynamic `pkg-config --libs --static libopenvswitchutils`" \
pybuild
override_dh_auto_build:
@@ -19,4 +19,5 @@
/vswitch-idl.h
/vswitch-idl.ovsidl
/libopenvswitch.pc
+/libopenvswitchutils.pc
/libsflow.pc
@@ -5,36 +5,16 @@
# notice and this notice are preserved. This file is offered as-is,
# without warranty of any kind.
-lib_LTLIBRARIES += lib/libopenvswitch.la
-
-lib_libopenvswitch_la_LIBADD = $(SSL_LIBS)
-lib_libopenvswitch_la_LIBADD += $(CAPNG_LDADD)
-
-lib_libopenvswitch_la_LDFLAGS = \
- $(OVS_LTINFO) \
- -Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \
- $(AM_LDFLAGS)
-
-# Build core vswitch libraries as before
-lib_libopenvswitch_la_SOURCES = \
+lib_libopenvswitchutils_la_SOURCES = \
lib/aes128.c \
lib/aes128.h \
lib/async-append.h \
lib/backtrace.c \
lib/backtrace.h \
- lib/bfd.c \
- lib/bfd.h \
lib/bitmap.h \
- lib/bundle.c \
- lib/bundle.h \
lib/byte-order.h \
lib/byteq.c \
lib/byteq.h \
- lib/cfm.c \
- lib/cfm.h \
- lib/classifier.c \
- lib/classifier.h \
- lib/classifier-private.h \
lib/ccmap.c \
lib/ccmap.h \
lib/cmap.c \
@@ -44,16 +24,6 @@ lib_libopenvswitch_la_SOURCES = \
lib/command-line.c \
lib/command-line.h \
lib/compiler.h \
- lib/connectivity.c \
- lib/connectivity.h \
- lib/conntrack-icmp.c \
- lib/conntrack-private.h \
- lib/conntrack-tcp.c \
- lib/conntrack-tp.c \
- lib/conntrack-tp.h \
- lib/conntrack-other.c \
- lib/conntrack.c \
- lib/conntrack.h \
lib/cooperative-multitasking.c \
lib/cooperative-multitasking.h \
lib/cooperative-multitasking-private.h \
@@ -63,42 +33,13 @@ lib_libopenvswitch_la_SOURCES = \
lib/crc32c.h \
lib/csum.c \
lib/csum.h \
- lib/ct-dpif.c \
- lib/ct-dpif.h \
lib/daemon.c \
lib/daemon.h \
lib/daemon-private.h \
lib/db-ctl-base.c \
lib/db-ctl-base.h \
- lib/dhcp.h \
- lib/dummy.c \
- lib/dummy.h \
lib/dhparams.h \
lib/dirs.h \
- lib/dpctl.c \
- lib/dpctl.h \
- lib/dp-packet.h \
- lib/dp-packet.c \
- lib/dp-packet-gso.c \
- lib/dp-packet-gso.h \
- lib/dpdk.h \
- lib/dpif-netdev-dfc.c \
- lib/dpif-netdev-dfc.h \
- lib/dpif-netdev-dpcls.c \
- lib/dpif-netdev-dpcls.h \
- lib/dpif-netdev-flow.h \
- lib/dpif-netdev-perf.c \
- lib/dpif-netdev-perf.h \
- lib/dpif-netdev-thread.h \
- lib/dpif-netdev.c \
- lib/dpif-netdev.h \
- lib/dpif-offload.c \
- lib/dpif-offload.h \
- lib/dpif-offload-dummy.c \
- lib/dpif-offload-provider.h \
- lib/dpif-provider.h \
- lib/dpif.c \
- lib/dpif.h \
lib/heap.c \
lib/heap.h \
lib/dynamic-string.c \
@@ -108,8 +49,6 @@ lib_libopenvswitch_la_SOURCES = \
lib/fat-rwlock.h \
lib/fatal-signal.c \
lib/fatal-signal.h \
- lib/flow.c \
- lib/flow.h \
lib/guarded-list.c \
lib/guarded-list.h \
lib/hash.c \
@@ -124,85 +63,25 @@ lib_libopenvswitch_la_SOURCES = \
lib/id-fpool.h \
lib/id-pool.c \
lib/id-pool.h \
- lib/if-notifier-manual.c \
- lib/if-notifier.h \
- lib/ipf.c \
- lib/ipf.h \
lib/jhash.c \
lib/jhash.h \
lib/json.c \
lib/json.h \
lib/jsonrpc.c \
lib/jsonrpc.h \
- lib/lacp.c \
- lib/lacp.h \
lib/latch.h \
- lib/learn.c \
- lib/learn.h \
- lib/learning-switch.c \
- lib/learning-switch.h \
lib/lockfile.c \
lib/lockfile.h \
- lib/mac-learning.c \
- lib/mac-learning.h \
- lib/match.c \
- lib/mcast-snooping.c \
- lib/mcast-snooping.h \
lib/memory.c \
lib/memory.h \
- lib/meta-flow.c \
lib/mov-avg.h \
lib/mpsc-queue.c \
lib/mpsc-queue.h \
- lib/multipath.c \
- lib/multipath.h \
lib/namemap.c \
- lib/netdev-dpdk.h \
- lib/netdev-dummy.c \
- lib/netdev-provider.h \
- lib/netdev-vport.c \
- lib/netdev-vport.h \
- lib/netdev-vport-private.h \
- lib/netdev.c \
- lib/netdev.h \
- lib/netflow.h \
- lib/netlink.c \
- lib/netlink.h \
- lib/netnsid.c \
- lib/netnsid.h \
- lib/nx-match.c \
- lib/nx-match.h \
+ lib/netaddr.c \
+ lib/netaddr.h \
lib/object-collection.c \
lib/object-collection.h \
- lib/odp-execute.c \
- lib/odp-execute.h \
- lib/odp-util.c \
- lib/odp-util.h \
- lib/ofp-actions.c \
- lib/ofp-bundle.c \
- lib/ofp-connection.c \
- lib/ofp-ct.c \
- lib/ofp-ed-props.c \
- lib/ofp-errors.c \
- lib/ofp-flow.c \
- lib/ofp-group.c \
- lib/ofp-ipfix.c \
- lib/ofp-match.c \
- lib/ofp-meter.c \
- lib/ofp-monitor.c \
- lib/ofp-msgs.c \
- lib/ofp-packet.c \
- lib/ofp-parse.c \
- lib/ofp-port.c \
- lib/ofp-print.c \
- lib/ofp-prop.c \
- lib/ofp-protocol.c \
- lib/ofp-queue.c \
- lib/ofp-switch.c \
- lib/ofp-table.c \
- lib/ofp-util.c \
- lib/ofp-version-opt.h \
- lib/ofp-version-opt.c \
lib/ofpbuf.c \
lib/ovs-atomic-c++.h \
lib/ovs-atomic-c11.h \
@@ -216,16 +95,12 @@ lib_libopenvswitch_la_SOURCES = \
lib/ovs-atomic-pthreads.h \
lib/ovs-atomic-x86_64.h \
lib/ovs-atomic.h \
- lib/ovs-lldp.c \
- lib/ovs-lldp.h \
lib/ovs-numa.c \
lib/ovs-numa.h \
lib/ovs-rcu.c \
lib/ovs-rcu.h \
lib/ovs-replay.c \
lib/ovs-replay.h \
- lib/ovs-router.h \
- lib/ovs-router.c \
lib/ovs-thread.c \
lib/ovs-thread.h \
lib/ovsdb-cs.c \
@@ -249,14 +124,6 @@ lib_libopenvswitch_la_SOURCES = \
lib/ovsdb-session.h \
lib/ovsdb-types.c \
lib/ovsdb-types.h \
- lib/ox-stat.c \
- lib/ox-stat.h \
- lib/netaddr.c \
- lib/netaddr.h \
- lib/packets.c \
- lib/packets.h \
- lib/pcap-file.c \
- lib/pcap-file.h \
lib/perf-counter.h \
lib/perf-counter.c \
lib/stopwatch.h \
@@ -268,15 +135,9 @@ lib_libopenvswitch_la_SOURCES = \
lib/pvector.h \
lib/random.c \
lib/random.h \
- lib/rconn.c \
lib/rculist.h \
lib/reconnect.c \
lib/reconnect.h \
- lib/rstp.c \
- lib/rstp.h \
- lib/rstp-common.h \
- lib/rstp-state-machines.c \
- lib/rstp-state-machines.h \
lib/sat-math.h \
lib/seq.c \
lib/seq.h \
@@ -295,8 +156,6 @@ lib_libopenvswitch_la_SOURCES = \
lib/sort.h \
lib/sset.c \
lib/sset.h \
- lib/stp.c \
- lib/stp.h \
lib/stream-fd.c \
lib/stream-fd.h \
lib/stream-provider.h \
@@ -321,22 +180,12 @@ lib_libopenvswitch_la_SOURCES = \
lib/timer.h \
lib/timeval.c \
lib/timeval.h \
- lib/tnl-neigh-cache.c \
- lib/tnl-neigh-cache.h \
- lib/tnl-ports.c \
- lib/tnl-ports.h \
- lib/netdev-native-tnl.c \
- lib/netdev-native-tnl.h \
lib/token-bucket.c \
- lib/tun-metadata.c \
- lib/tun-metadata.h \
lib/unaligned.h \
lib/unicode.c \
lib/unicode.h \
lib/unixctl.c \
lib/unixctl.h \
- lib/userspace-tso.c \
- lib/userspace-tso.h \
lib/util.c \
lib/util.h \
lib/uuid.c \
@@ -344,24 +193,9 @@ lib_libopenvswitch_la_SOURCES = \
lib/uuidset.c \
lib/uuidset.h \
lib/valgrind.h \
- lib/vconn-provider.h \
- lib/vconn-stream.c \
- lib/vconn.c \
- lib/versions.h \
- lib/vl-mff-map.h \
- lib/vlan-bitmap.c \
- lib/vlan-bitmap.h \
- lib/vlog.c \
- lib/lldp/aa-structs.h \
- lib/lldp/lldp.c \
- lib/lldp/lldp-const.h \
- lib/lldp/lldp-tlv.h \
- lib/lldp/lldpd.c \
- lib/lldp/lldpd.h \
- lib/lldp/lldpd-structs.c \
- lib/lldp/lldpd-structs.h
+ lib/vlog.c
-lib_libopenvswitch_la_SOURCES += \
+lib_libopenvswitchutils_la_SOURCES += \
lib/daemon-unix.c \
lib/latch-unix.c \
lib/signals.c \
@@ -372,14 +206,192 @@ lib_libopenvswitch_la_SOURCES += \
EXTRA_DIST += \
lib/string.h.in
-nodist_lib_libopenvswitch_la_SOURCES = \
+nodist_lib_libopenvswitchutils_la_SOURCES = \
lib/dirs.c \
lib/ovsdb-server-idl.c \
- lib/ovsdb-server-idl.h \
+ lib/ovsdb-server-idl.h
+CLEANFILES += $(nodist_lib_libopenvswitchutils_la_SOURCES)
+
+lib_LTLIBRARIES += lib/libopenvswitchutils.la
+
+lib_libopenvswitchutils_la_LIBADD = $(SSL_LIBS) $(CAPNG_LDADD)
+
+lib_libopenvswitchutils_la_LDFLAGS = \
+ $(OVS_LTINFO) \
+ -Wl,--version-script=$(top_builddir)/lib/libopenvswitchutils.sym \
+ $(AM_LDFLAGS)
+
+lib_LTLIBRARIES += lib/libopenvswitch.la
+
+lib_libopenvswitch_la_LIBADD = lib/libopenvswitchutils.la
+
+lib_libopenvswitch_la_LDFLAGS = \
+ $(OVS_LTINFO) \
+ -Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \
+ $(AM_LDFLAGS)
+
+nodist_lib_libopenvswitch_la_SOURCES = \
lib/vswitch-idl.c \
lib/vswitch-idl.h
CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
+lib_libopenvswitch_la_SOURCES = \
+ lib/bfd.c \
+ lib/bfd.h \
+ lib/bundle.c \
+ lib/bundle.h \
+ lib/cfm.c \
+ lib/cfm.h \
+ lib/classifier.c \
+ lib/classifier.h \
+ lib/classifier-private.h \
+ lib/connectivity.c \
+ lib/connectivity.h \
+ lib/conntrack-icmp.c \
+ lib/conntrack-private.h \
+ lib/conntrack-tcp.c \
+ lib/conntrack-tp.c \
+ lib/conntrack-tp.h \
+ lib/conntrack-other.c \
+ lib/conntrack.c \
+ lib/conntrack.h \
+ lib/ct-dpif.c \
+ lib/ct-dpif.h \
+ lib/dhcp.h \
+ lib/dummy.c \
+ lib/dummy.h \
+ lib/dpctl.c \
+ lib/dpctl.h \
+ lib/dp-packet.h \
+ lib/dp-packet.c \
+ lib/dp-packet-gso.c \
+ lib/dp-packet-gso.h \
+ lib/dpdk.h \
+ lib/dpif-netdev-dfc.c \
+ lib/dpif-netdev-dfc.h \
+ lib/dpif-netdev-dpcls.c \
+ lib/dpif-netdev-dpcls.h \
+ lib/dpif-netdev-flow.h \
+ lib/dpif-netdev-perf.c \
+ lib/dpif-netdev-perf.h \
+ lib/dpif-netdev-thread.h \
+ lib/dpif-netdev.c \
+ lib/dpif-netdev.h \
+ lib/dpif-offload.c \
+ lib/dpif-offload.h \
+ lib/dpif-offload-dummy.c \
+ lib/dpif-offload-provider.h \
+ lib/dpif-provider.h \
+ lib/dpif.c \
+ lib/dpif.h \
+ lib/flow.c \
+ lib/flow.h \
+ lib/if-notifier-manual.c \
+ lib/if-notifier.h \
+ lib/ipf.c \
+ lib/ipf.h \
+ lib/lacp.c \
+ lib/lacp.h \
+ lib/learn.c \
+ lib/learn.h \
+ lib/learning-switch.c \
+ lib/learning-switch.h \
+ lib/mac-learning.c \
+ lib/mac-learning.h \
+ lib/match.c \
+ lib/mcast-snooping.c \
+ lib/mcast-snooping.h \
+ lib/meta-flow.c \
+ lib/multipath.c \
+ lib/multipath.h \
+ lib/netdev-dpdk.h \
+ lib/netdev-dummy.c \
+ lib/netdev-provider.h \
+ lib/netdev-vport.c \
+ lib/netdev-vport.h \
+ lib/netdev-vport-private.h \
+ lib/netdev.c \
+ lib/netdev.h \
+ lib/netflow.h \
+ lib/netlink.c \
+ lib/netlink.h \
+ lib/netnsid.c \
+ lib/netnsid.h \
+ lib/nx-match.c \
+ lib/nx-match.h \
+ lib/odp-execute.c \
+ lib/odp-execute.h \
+ lib/odp-util.c \
+ lib/odp-util.h \
+ lib/ofp-actions.c \
+ lib/ofp-bundle.c \
+ lib/ofp-connection.c \
+ lib/ofp-ct.c \
+ lib/ofp-ed-props.c \
+ lib/ofp-errors.c \
+ lib/ofp-flow.c \
+ lib/ofp-group.c \
+ lib/ofp-ipfix.c \
+ lib/ofp-match.c \
+ lib/ofp-meter.c \
+ lib/ofp-monitor.c \
+ lib/ofp-msgs.c \
+ lib/ofp-packet.c \
+ lib/ofp-parse.c \
+ lib/ofp-port.c \
+ lib/ofp-print.c \
+ lib/ofp-prop.c \
+ lib/ofp-protocol.c \
+ lib/ofp-queue.c \
+ lib/ofp-switch.c \
+ lib/ofp-table.c \
+ lib/ofp-util.c \
+ lib/ofp-version-opt.h \
+ lib/ofp-version-opt.c \
+ lib/ovs-lldp.c \
+ lib/ovs-lldp.h \
+ lib/ovs-router.h \
+ lib/ovs-router.c \
+ lib/ox-stat.c \
+ lib/ox-stat.h \
+ lib/packets.c \
+ lib/packets.h \
+ lib/pcap-file.c \
+ lib/pcap-file.h \
+ lib/rconn.c \
+ lib/rstp.c \
+ lib/rstp.h \
+ lib/rstp-common.h \
+ lib/rstp-state-machines.c \
+ lib/rstp-state-machines.h \
+ lib/stp.c \
+ lib/stp.h \
+ lib/tnl-neigh-cache.c \
+ lib/tnl-neigh-cache.h \
+ lib/tnl-ports.c \
+ lib/tnl-ports.h \
+ lib/netdev-native-tnl.c \
+ lib/netdev-native-tnl.h \
+ lib/tun-metadata.c \
+ lib/tun-metadata.h \
+ lib/userspace-tso.c \
+ lib/userspace-tso.h \
+ lib/vconn-provider.h \
+ lib/vconn-stream.c \
+ lib/vconn.c \
+ lib/versions.h \
+ lib/vl-mff-map.h \
+ lib/vlan-bitmap.c \
+ lib/vlan-bitmap.h \
+ lib/lldp/aa-structs.h \
+ lib/lldp/lldp.c \
+ lib/lldp/lldp-const.h \
+ lib/lldp/lldp-tlv.h \
+ lib/lldp/lldpd.c \
+ lib/lldp/lldpd.h \
+ lib/lldp/lldpd-structs.c \
+ lib/lldp/lldpd-structs.h
+
lib_LTLIBRARIES += lib/libsflow.la
lib_libsflow_la_LDFLAGS = \
$(OVS_LTINFO) \
@@ -450,9 +462,9 @@ lib_libopenvswitch_la_SOURCES += \
endif
if HAVE_POSIX_AIO
-lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
+lib_libopenvswitchutils_la_SOURCES += lib/async-append-aio.c
else
-lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
+lib_libopenvswitchutils_la_SOURCES += lib/async-append-null.c
endif
if HAVE_IF_DL
@@ -466,7 +478,7 @@ endif
.PHONY: generate-dhparams-c
if HAVE_OPENSSL
-lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c lib/dhparams.c
+lib_libopenvswitchutils_la_SOURCES += lib/stream-ssl.c lib/dhparams.c
# Manually regenerates lib/dhparams.c. Not normally necessary since
# lib/dhparams.c is part of the repository and doesn't normally need
@@ -476,18 +488,19 @@ generate-dhparams-c:
build-aux/generate-dhparams-c > lib/dhparams.c.tmp && \
mv lib/dhparams.c.tmp lib/dhparams.c
else
-lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
+lib_libopenvswitchutils_la_SOURCES += lib/stream-nossl.c
endif
-lib_libopenvswitch_la_SOURCES += lib/dns-resolve.h
+lib_libopenvswitchutils_la_SOURCES += lib/dns-resolve.h
if HAVE_UNBOUND
-lib_libopenvswitch_la_SOURCES += lib/dns-resolve.c
+lib_libopenvswitchutils_la_SOURCES += lib/dns-resolve.c
else
-lib_libopenvswitch_la_SOURCES += lib/dns-resolve-stub.c
+lib_libopenvswitchutils_la_SOURCES += lib/dns-resolve-stub.c
endif
pkgconfig_DATA += \
lib/libopenvswitch.pc \
+ lib/libopenvswitchutils.pc \
lib/libsflow.pc
EXTRA_DIST += \
@@ -7,5 +7,6 @@ Name: libopenvswitch
Description: Open vSwitch library
Version: @VERSION@
Libs: -L${libdir} -lopenvswitch
-Libs.private: @LIBS@ @SSL_LIBS@ @CAPNG_LDADD@
+Requires.private: libopenvswitchutils
+Libs.private: @LIBS@
Cflags: -I${includedir}
new file mode 100644
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libopenvswitchutils
+Description: Open vSwitch common library
+Version: @VERSION@
+Libs: -L${libdir} -lopenvswitchutils
+Libs.private: @LIBS@ @SSL_LIBS@ @CAPNG_LDADD@
+Cflags: -I${includedir}
new file mode 100644
@@ -0,0 +1,4 @@
+libopenvswitchutils_@LT_CURRENT@ {
+global:
+ *;
+};
@@ -63,7 +63,7 @@ MAN_FRAGMENTS += ovsdb/ovsdb-schemas.man
# ovsdb-tool
bin_PROGRAMS += ovsdb/ovsdb-tool
ovsdb_ovsdb_tool_SOURCES = ovsdb/ovsdb-tool.c
-ovsdb_ovsdb_tool_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
+ovsdb_ovsdb_tool_LDADD = ovsdb/libovsdb.la lib/libopenvswitchutils.la
# ovsdb-tool.1
man_MANS += ovsdb/ovsdb-tool.1
CLEANFILES += ovsdb/ovsdb-tool.1
@@ -72,7 +72,7 @@ MAN_ROOTS += ovsdb/ovsdb-tool.1.in
# ovsdb-client
bin_PROGRAMS += ovsdb/ovsdb-client
ovsdb_ovsdb_client_SOURCES = ovsdb/ovsdb-client.c
-ovsdb_ovsdb_client_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
+ovsdb_ovsdb_client_LDADD = ovsdb/libovsdb.la lib/libopenvswitchutils.la
# ovsdb-client.1
man_MANS += ovsdb/ovsdb-client.1
CLEANFILES += ovsdb/ovsdb-client.1
@@ -81,7 +81,7 @@ MAN_ROOTS += ovsdb/ovsdb-client.1.in
# ovsdb-server
sbin_PROGRAMS += ovsdb/ovsdb-server
ovsdb_ovsdb_server_SOURCES = ovsdb/ovsdb-server.c
-ovsdb_ovsdb_server_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
+ovsdb_ovsdb_server_LDADD = ovsdb/libovsdb.la lib/libopenvswitchutils.la
# ovsdb-server.1
man_MANS += ovsdb/ovsdb-server.1
CLEANFILES += ovsdb/ovsdb-server.1
@@ -69,7 +69,7 @@ class try_build_ext(build_ext):
if os.environ.get('enable_shared', '') == 'no':
libraries = []
else:
- libraries = ['openvswitch']
+ libraries = ['openvswitchutils']
extra_cflags = os.environ.get('extra_cflags', '').split()
extra_libs = os.environ.get('extra_libs', '').split()
@@ -441,12 +441,12 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
noinst_PROGRAMS += tests/test-ovsdb
tests_test_ovsdb_SOURCES = tests/test-ovsdb.c
nodist_tests_test_ovsdb_SOURCES = tests/idltest.c tests/idltest.h
-tests_test_ovsdb_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
+tests_test_ovsdb_LDADD = ovsdb/libovsdb.la lib/libopenvswitchutils.la
noinst_PROGRAMS += tests/test-lib
tests_test_lib_SOURCES = \
tests/test-lib.c
-tests_test_lib_LDADD = lib/libopenvswitch.la
+tests_test_lib_LDADD = lib/libopenvswitchutils.la
# idltest schema and IDL
OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
@@ -517,11 +517,11 @@ tests_ovstest_SOURCES += \
tests/test-psample.c
endif
-tests_ovstest_LDADD = lib/libopenvswitch.la
+tests_ovstest_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la
noinst_PROGRAMS += tests/test-stream
tests_test_stream_SOURCES = tests/test-stream.c
-tests_test_stream_LDADD = lib/libopenvswitch.la
+tests_test_stream_LDADD = lib/libopenvswitchutils.la
noinst_PROGRAMS += tests/test-strtok_r
tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
@@ -11,37 +11,37 @@ oss-fuzz-targets: $(OSS_FUZZ_TARGETS)
tests_oss_fuzz_flow_extract_target_SOURCES = \
tests/oss-fuzz/flow_extract_target.c \
tests/oss-fuzz/fuzzer.h
-tests_oss_fuzz_flow_extract_target_LDADD = lib/libopenvswitch.la
+tests_oss_fuzz_flow_extract_target_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la
tests_oss_fuzz_flow_extract_target_LDFLAGS = $(LIB_FUZZING_ENGINE) -lc++
tests_oss_fuzz_json_parser_target_SOURCES = \
tests/oss-fuzz/json_parser_target.c \
tests/oss-fuzz/fuzzer.h
-tests_oss_fuzz_json_parser_target_LDADD = lib/libopenvswitch.la
+tests_oss_fuzz_json_parser_target_LDADD = lib/libopenvswitchutils.la
tests_oss_fuzz_json_parser_target_LDFLAGS = $(LIB_FUZZING_ENGINE) -lc++
tests_oss_fuzz_ofp_print_target_SOURCES = \
tests/oss-fuzz/ofp_print_target.c \
tests/oss-fuzz/fuzzer.h
-tests_oss_fuzz_ofp_print_target_LDADD = lib/libopenvswitch.la
+tests_oss_fuzz_ofp_print_target_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la
tests_oss_fuzz_ofp_print_target_LDFLAGS = $(LIB_FUZZING_ENGINE) -lc++
tests_oss_fuzz_odp_target_SOURCES = \
tests/oss-fuzz/odp_target.c \
tests/oss-fuzz/fuzzer.h
-tests_oss_fuzz_odp_target_LDADD = lib/libopenvswitch.la
+tests_oss_fuzz_odp_target_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la
tests_oss_fuzz_odp_target_LDFLAGS = $(LIB_FUZZING_ENGINE) -lc++
tests_oss_fuzz_miniflow_target_SOURCES = \
tests/oss-fuzz/miniflow_target.c \
tests/oss-fuzz/fuzzer.h
-tests_oss_fuzz_miniflow_target_LDADD = lib/libopenvswitch.la
+tests_oss_fuzz_miniflow_target_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la
tests_oss_fuzz_miniflow_target_LDFLAGS = $(LIB_FUZZING_ENGINE) -lc++
tests_oss_fuzz_ofctl_parse_target_SOURCES = \
tests/oss-fuzz/ofctl_parse_target.c \
tests/oss-fuzz/fuzzer.h
-tests_oss_fuzz_ofctl_parse_target_LDADD = lib/libopenvswitch.la
+tests_oss_fuzz_ofctl_parse_target_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la
tests_oss_fuzz_ofctl_parse_target_LDFLAGS = $(LIB_FUZZING_ENGINE) -lc++
EXTRA_DIST += \
@@ -22,7 +22,6 @@
#include <openvswitch/thread.h>
#include <openvswitch/types.h>
#include <openvswitch/util.h>
-#include <openvswitch/vconn.h>
#include <openvswitch/vlog.h>
static void
@@ -111,26 +111,27 @@ man_MANS += \
utilities/ovs-vsctl.8
utilities_ovs_appctl_SOURCES = utilities/ovs-appctl.c
-utilities_ovs_appctl_LDADD = lib/libopenvswitch.la
+utilities_ovs_appctl_LDADD = lib/libopenvswitchutils.la
utilities_ovs_testcontroller_SOURCES = utilities/ovs-testcontroller.c
-utilities_ovs_testcontroller_LDADD = lib/libopenvswitch.la $(SSL_LIBS)
+utilities_ovs_testcontroller_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la $(SSL_LIBS)
utilities_ovs_dpctl_SOURCES = utilities/ovs-dpctl.c
-utilities_ovs_dpctl_LDADD = lib/libopenvswitch.la
+utilities_ovs_dpctl_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la
utilities_ovs_ofctl_SOURCES = utilities/ovs-ofctl.c
utilities_ovs_ofctl_LDADD = \
ofproto/libofproto.la \
- lib/libopenvswitch.la
+ lib/libopenvswitch.la \
+ lib/libopenvswitchutils.la
utilities_ovs_vsctl_SOURCES = utilities/ovs-vsctl.c
-utilities_ovs_vsctl_LDADD = lib/libopenvswitch.la
+utilities_ovs_vsctl_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la
if LINUX
noinst_PROGRAMS += utilities/nlmon
utilities_nlmon_SOURCES = utilities/nlmon.c
-utilities_nlmon_LDADD = lib/libopenvswitch.la
+utilities_nlmon_LDADD = lib/libopenvswitch.la lib/libopenvswitchutils.la
endif
FLAKE8_PYFILES += utilities/ovs-pcap.in \
@@ -383,6 +383,7 @@ def get_ovs_definitions(objects, pahole="pahole", pid=None):
ovs_libs = [
"libofproto",
"libopenvswitch",
+ "libopenvswitchutils",
"libovsdb",
"libsflow",
"libvtep",
@@ -402,8 +402,8 @@ def get_ovs_definitions(objects, pahole="pahole", pid=None):
return dbg_file
def get_from_shared_library(debug_file):
- ovs_libs = ['libofproto', 'libopenvswitch', 'libovsdb', 'libsflow',
- 'libvtep']
+ ovs_libs = ['libofproto', 'libopenvswitch', 'libopenvswitchutils',
+ 'libovsdb', 'libsflow', 'libvtep']
error, ldd_result = run_program(['ldd', debug_file])
if error:
@@ -12,7 +12,8 @@ vswitchd_ovs_vswitchd_SOURCES = \
vswitchd_ovs_vswitchd_LDADD = \
ofproto/libofproto.la \
lib/libsflow.la \
- lib/libopenvswitch.la
+ lib/libopenvswitch.la \
+ lib/libopenvswitchutils.la
vswitchd_ovs_vswitchd_LDFLAGS = $(AM_LDFLAGS) $(DPDK_vswitchd_LDFLAGS)
MAN_ROOTS += vswitchd/ovs-vswitchd.8.in
@@ -34,7 +34,7 @@ man_MANS += \
vtep/vtep-ctl.8
vtep_vtep_ctl_SOURCES = vtep/vtep-ctl.c
-vtep_vtep_ctl_LDADD = vtep/libvtep.la lib/libopenvswitch.la
+vtep_vtep_ctl_LDADD = vtep/libvtep.la lib/libopenvswitchutils.la
# ovs-vtep
scripts_SCRIPTS += \
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, and libopenvswitch links libopenvswitchutils, so a process that uses both only ever loads one copy of the utils code (constructors, RCU thread, signal handlers, global state). 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 call utils functions directly, so they list libopenvswitchutils as well. This is required for shared builds, where the linker does not resolve symbols through indirect dependencies. USDT probe scripts updated to also search libopenvswitchutils for struct definitions. Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> --- NEWS | 7 + configure.ac | 2 + debian/rules | 4 +- lib/.gitignore | 1 + lib/automake.mk | 373 ++++++++++--------- lib/libopenvswitch.pc.in | 3 +- lib/libopenvswitchutils.pc.in | 11 + lib/libopenvswitchutils.sym.in | 4 + ovsdb/automake.mk | 6 +- python/setup.py.template | 2 +- tests/automake.mk | 8 +- tests/oss-fuzz/automake.mk | 12 +- tests/test-lib.c | 1 - utilities/automake.mk | 13 +- utilities/usdt-scripts/flow_reval_monitor.py | 1 + utilities/usdt-scripts/reval_monitor.py | 4 +- vswitchd/automake.mk | 3 +- vtep/automake.mk | 2 +- 18 files changed, 249 insertions(+), 208 deletions(-) create mode 100644 lib/libopenvswitchutils.pc.in create mode 100644 lib/libopenvswitchutils.sym.in