@@ -1,6 +1,11 @@
Post-v3.7.0
--------------------
-
+ - libopenvswitch API/ABI change:
+ * To make the link time dependencies (and disk space) a bit clearer,
+ the libopenvswitch library has been split into two:
+ - libopenvswitch (which is mostly datapath related)
+ - libovscommon (which contains the container datastructures, general
+ utilities, etc).
v3.7.0 - 16 Feb 2026
--------------------
@@ -152,6 +152,7 @@ AC_CONFIG_FILES([
ovsdb/libovsdb.sym
ofproto/libofproto.sym
lib/libsflow.sym
+ lib/libovscommon.sym
lib/libopenvswitch.sym
vtep/libvtep.sym])
@@ -212,6 +213,7 @@ AC_SUBST([OVS_LDFLAGS])
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(tests/atlocal)
+AC_CONFIG_FILES(lib/libovscommon.pc)
AC_CONFIG_FILES(lib/libopenvswitch.pc)
AC_CONFIG_FILES(lib/libsflow.pc)
AC_CONFIG_FILES(ofproto/libofproto.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 libovscommon`" \
+ extra_libs="-Wl,-Bstatic -lovscommon -Wl,-Bdynamic `pkg-config --libs --static libovscommon`" \
pybuild
override_dh_auto_build:
@@ -19,4 +19,5 @@
/vswitch-idl.h
/vswitch-idl.ovsidl
/libopenvswitch.pc
+/libovscommon.pc
/libsflow.pc
@@ -5,76 +5,33 @@
# 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)
+# libovscommon: The common libraries used by any/all included utilities.
+# Contains the container structures (maps, lists, etc), threading, i/o,
+# logging, ovsdb-client, etc.
+lib_LTLIBRARIES += lib/libovscommon.la
+lib_libovscommon_la_LIBADD = $(SSL_LIBS)
+lib_libovscommon_la_LIBADD += $(CAPNG_LDADD)
if WIN32
-lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
+lib_libovscommon_la_LIBADD += ${PTHREAD_LIBS}
endif
-lib_libopenvswitch_la_LDFLAGS = \
+lib_libovscommon_la_LDFLAGS = \
$(OVS_LTINFO) \
- -Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \
+ -Wl,--version-script=$(top_builddir)/lib/libovscommon.sym \
$(AM_LDFLAGS)
-if HAVE_AVX512F
-if HAVE_LD_AVX512_GOOD
-# Build library of avx512 code with CPU ISA CFLAGS enabled. This allows the
-# compiler to use the ISA features required for the ISA optimized code-paths.
-# Use LDFLAGS to compile only static library of this code, as it should be
-# statically linked into vswitchd even if vswitchd is a shared build.
-noinst_LTLIBRARIES += lib/libopenvswitchavx512.la
-lib_libopenvswitch_la_LIBADD += lib/libopenvswitchavx512.la
-lib_libopenvswitchavx512_la_CFLAGS = \
- -mavx512f \
- -mbmi \
- -mbmi2 \
- -fPIC \
- $(AM_CFLAGS)
-lib_libopenvswitchavx512_la_SOURCES = \
- lib/dpif-netdev-avx512.c
-if HAVE_AVX512BW
-if HAVE_AVX512VL
-lib_libopenvswitchavx512_la_CFLAGS += \
- -mavx512bw \
- -mavx512vl
-lib_libopenvswitchavx512_la_SOURCES += \
- lib/dpif-netdev-extract-avx512.c \
- lib/dpif-netdev-lookup-avx512-gather.c
-if HAVE_GCC_AVX512VL_GOOD
-lib_libopenvswitchavx512_la_SOURCES += \
- lib/odp-execute-avx512.c
-endif # HAVE_GCC_AVX512VL_GOOD
-endif # HAVE_AVX512VL
-endif # HAVE_AVX512BW
-lib_libopenvswitchavx512_la_LDFLAGS = \
- -static
-endif # HAVE_LD_AVX512_GOOD
-endif # HAVE_AVX512F
-
-# Build core vswitch libraries as before
-lib_libopenvswitch_la_SOURCES = \
+lib_libovscommon_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 \
@@ -84,75 +41,22 @@ 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 \
lib/coverage.c \
lib/coverage.h \
- lib/ct-state.h \
lib/cpu.c \
lib/cpu.h \
lib/crc32c.c \
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-extract-study.c \
- lib/dpif-netdev-lookup.h \
- lib/dpif-netdev-lookup.c \
- lib/dpif-netdev-lookup-autovalidator.c \
- lib/dpif-netdev-lookup-generic.c \
- lib/dpif-netdev.c \
- lib/dpif-netdev.h \
- lib/dpif-netdev-private-dfc.c \
- lib/dpif-netdev-private-dfc.h \
- lib/dpif-netdev-private-dpcls.h \
- lib/dpif-netdev-private-dpif.c \
- lib/dpif-netdev-private-dpif.h \
- lib/dpif-netdev-private-extract.c \
- lib/dpif-netdev-private-extract.h \
- lib/dpif-netdev-private-flow.h \
- lib/dpif-netdev-private-thread.h \
- lib/dpif-netdev-private.h \
- lib/dpif-netdev-perf.c \
- lib/dpif-netdev-perf.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 \
lib/entropy.c \
lib/entropy.h \
@@ -160,13 +64,13 @@ 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 \
lib/hash.h \
lib/hash-aarch64.h \
+ lib/heap.c \
+ lib/heap.h \
lib/hindex.c \
lib/hindex.h \
lib/hmap.c \
@@ -176,89 +80,23 @@ 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/net-proto.h \
- lib/net-proto.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.h \
- lib/nx-match.c \
- lib/nx-match.h \
lib/object-collection.c \
lib/object-collection.h \
- lib/odp-execute.c \
- lib/odp-execute.h \
- lib/odp-execute-private.c \
- lib/odp-execute-private.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 \
lib/ovs-atomic-clang.h \
@@ -272,18 +110,16 @@ 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-condition.h \
+ lib/ovsdb-condition.c \
lib/ovsdb-cs.c \
lib/ovsdb-cs.h \
lib/ovsdb-data.c \
@@ -295,24 +131,19 @@ lib_libopenvswitch_la_SOURCES = \
lib/ovsdb-idl.h \
lib/ovsdb-map-op.c \
lib/ovsdb-map-op.h \
- lib/ovsdb-set-op.c \
- lib/ovsdb-set-op.h \
- lib/ovsdb-condition.h \
- lib/ovsdb-condition.c \
lib/ovsdb-parser.c \
lib/ovsdb-parser.h \
lib/ovsdb-session.c \
lib/ovsdb-session.h \
+ lib/ovsdb-set-op.c \
+ lib/ovsdb-set-op.h \
lib/ovsdb-types.c \
lib/ovsdb-types.h \
- lib/ox-stat.c \
- lib/ox-stat.h \
- lib/pcap-file.c \
- lib/pcap-file.h \
lib/perf-counter.h \
lib/perf-counter.c \
- lib/stopwatch.h \
- lib/stopwatch.c \
+ lib/net-proto.c \
+ lib/net-proto.h \
+ lib/ofpbuf.c \
lib/poll-loop.c \
lib/process.c \
lib/process.h \
@@ -320,15 +151,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 \
@@ -347,8 +172,9 @@ lib_libopenvswitch_la_SOURCES = \
lib/sort.h \
lib/sset.c \
lib/sset.h \
- lib/stp.c \
- lib/stp.h \
+ lib/stdio.c \
+ lib/stopwatch.h \
+ lib/stopwatch.c \
lib/stream-fd.c \
lib/stream-fd.h \
lib/stream-provider.h \
@@ -357,7 +183,6 @@ lib_libopenvswitch_la_SOURCES = \
lib/stream-tcp.c \
lib/stream.c \
lib/stream.h \
- lib/stdio.c \
lib/string.c \
lib/svec.c \
lib/svec.h \
@@ -374,22 +199,11 @@ 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 \
@@ -397,35 +211,18 @@ 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
if WIN32
-lib_libopenvswitch_la_SOURCES += \
+lib_libovscommon_la_SOURCES += \
lib/daemon-windows.c \
lib/getopt_long.c \
lib/getrusage-windows.c \
lib/latch-windows.c \
- lib/route-table-stub.c \
- lib/if-notifier-stub.c \
lib/stream-windows.c \
lib/strsep.c
else
-lib_libopenvswitch_la_SOURCES += \
+lib_libovscommon_la_SOURCES += \
lib/daemon-unix.c \
lib/latch-unix.c \
lib/signals.c \
@@ -434,37 +231,269 @@ lib_libopenvswitch_la_SOURCES += \
lib/stream-unix.c
endif
-EXTRA_DIST += \
- lib/stdio.h.in \
- lib/string.h.in
+if HAVE_POSIX_AIO
+lib_libovscommon_la_SOURCES += lib/async-append-aio.c
+else
+lib_libovscommon_la_SOURCES += lib/async-append-null.c
+endif
+
+if HAVE_OPENSSL
+lib_libovscommon_la_SOURCES += lib/stream-ssl.c lib/dhparams.c
+else
+lib_libovscommon_la_SOURCES += lib/stream-nossl.c
+endif
+
+lib_libovscommon_la_SOURCES += lib/dns-resolve.h
+if HAVE_UNBOUND
+lib_libovscommon_la_SOURCES += lib/dns-resolve.c
+else
+lib_libovscommon_la_SOURCES += lib/dns-resolve-stub.c
+endif
-nodist_lib_libopenvswitch_la_SOURCES = \
+nodist_lib_libovscommon_la_SOURCES = \
lib/dirs.c \
lib/ovsdb-server-idl.c \
lib/ovsdb-server-idl.h \
lib/vswitch-idl.c \
lib/vswitch-idl.h
-CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
+CLEANFILES += $(nodist_lib_libovscommon_la_SOURCES)
-lib_LTLIBRARIES += lib/libsflow.la
-lib_libsflow_la_LDFLAGS = \
- $(OVS_LTINFO) \
- -Wl,--version-script=$(top_builddir)/lib/libsflow.sym \
- $(AM_LDFLAGS)
-lib_libsflow_la_SOURCES = \
- lib/sflow_api.h \
- lib/sflow.h \
- lib/sflow_agent.c \
- lib/sflow_sampler.c \
- lib/sflow_poller.c \
- lib/sflow_receiver.c
-lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
-lib_libsflow_la_CFLAGS = $(AM_CFLAGS) -D_BSD_SOURCE -D_DEFAULT_SOURCE
-if HAVE_WNO_UNUSED
-lib_libsflow_la_CFLAGS += -Wno-unused
-endif
-if HAVE_WNO_UNUSED_PARAMETER
-lib_libsflow_la_CFLAGS += -Wno-unused-parameter
+pkgconfig_DATA += lib/libovscommon.pc
+
+# libopenvswitch: switching datapath library.
+# Contains the openflow handling, flow processing, netdev, dpif, etc.
+
+lib_LTLIBRARIES += lib/libopenvswitch.la
+
+lib_libopenvswitch_la_LIBADD = lib/libovscommon.la
+
+lib_libopenvswitch_la_LDFLAGS = \
+ $(OVS_LTINFO) \
+ -Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \
+ $(AM_LDFLAGS)
+
+if HAVE_AVX512F
+if HAVE_LD_AVX512_GOOD
+# Build library of avx512 code with CPU ISA CFLAGS enabled. This allows the
+# compiler to use the ISA features required for the ISA optimized code-paths.
+# Use LDFLAGS to compile only static library of this code, as it should be
+# statically linked into vswitchd even if vswitchd is a shared build.
+noinst_LTLIBRARIES += lib/libopenvswitchavx512.la
+lib_libopenvswitch_la_LIBADD += lib/libopenvswitchavx512.la
+lib_libopenvswitchavx512_la_CFLAGS = \
+ -mavx512f \
+ -mbmi \
+ -mbmi2 \
+ -fPIC \
+ $(AM_CFLAGS)
+lib_libopenvswitchavx512_la_SOURCES = \
+ lib/dpif-netdev-avx512.c
+if HAVE_AVX512BW
+if HAVE_AVX512VL
+lib_libopenvswitchavx512_la_CFLAGS += \
+ -mavx512bw \
+ -mavx512vl
+lib_libopenvswitchavx512_la_SOURCES += \
+ lib/dpif-netdev-extract-avx512.c \
+ lib/dpif-netdev-lookup-avx512-gather.c
+if HAVE_GCC_AVX512VL_GOOD
+lib_libopenvswitchavx512_la_SOURCES += \
+ lib/odp-execute-avx512.c
+endif # HAVE_GCC_AVX512VL_GOOD
+endif # HAVE_AVX512VL
+endif # HAVE_AVX512BW
+lib_libopenvswitchavx512_la_LDFLAGS = \
+ -static
+endif # HAVE_LD_AVX512_GOOD
+endif # HAVE_AVX512F
+
+# Build core vswitch libraries as before
+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/ct-state.h \
+ lib/dhcp.h \
+ lib/dummy.c \
+ lib/dummy.h \
+ lib/dhparams.h \
+ lib/dirs.h \
+ lib/dp-packet.h \
+ lib/dp-packet.c \
+ lib/dp-packet-gso.c \
+ lib/dp-packet-gso.h \
+ lib/pcap-file.c \
+ lib/pcap-file.h \
+ lib/dpdk.h \
+ lib/dpctl.c \
+ lib/dpctl.h \
+ lib/dpif-netdev-extract-study.c \
+ lib/dpif-netdev-lookup.h \
+ lib/dpif-netdev-lookup.c \
+ lib/dpif-netdev-lookup-autovalidator.c \
+ lib/dpif-netdev-lookup-generic.c \
+ lib/dpif-netdev.c \
+ lib/dpif-netdev.h \
+ lib/dpif-netdev-private-dfc.c \
+ lib/dpif-netdev-private-dfc.h \
+ lib/dpif-netdev-private-dpcls.h \
+ lib/dpif-netdev-private-dpif.c \
+ lib/dpif-netdev-private-dpif.h \
+ lib/dpif-netdev-private-extract.c \
+ lib/dpif-netdev-private-extract.h \
+ lib/dpif-netdev-private-flow.h \
+ lib/dpif-netdev-private-thread.h \
+ lib/dpif-netdev-private.h \
+ lib/dpif-netdev-perf.c \
+ lib/dpif-netdev-perf.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.h \
+ lib/if-notifier-manual.c \
+ 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.h \
+ lib/nx-match.c \
+ lib/nx-match.h \
+ lib/odp-execute.c \
+ lib/odp-execute.h \
+ lib/odp-execute-private.c \
+ lib/odp-execute-private.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/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/unaligned.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
+
+if WIN32
+lib_libopenvswitch_la_SOURCES += \
+ lib/dpif-netlink.c \
+ lib/dpif-netlink.h \
+ lib/dpif-netlink-rtnl.h \
+ lib/netdev-windows.c \
+ lib/netlink-conntrack.c \
+ lib/netlink-conntrack.h \
+ lib/netlink-notifier.c \
+ lib/netlink-notifier.h \
+ lib/netlink-protocol.h \
+ lib/netlink-socket.c \
+ lib/netlink-socket.h \
+ lib/route-table-stub.c \
+ lib/if-notifier-stub.c \
+ lib/wmi.c \
+ lib/wmi.h
endif
if LINUX
@@ -515,29 +544,6 @@ lib_libopenvswitch_la_SOURCES += \
lib/dpdk-stub.c
endif
-if WIN32
-lib_libopenvswitch_la_SOURCES += \
- lib/dpif-netlink.c \
- lib/dpif-netlink.h \
- lib/dpif-netlink-rtnl.h \
- lib/netdev-windows.c \
- lib/netlink-conntrack.c \
- lib/netlink-conntrack.h \
- lib/netlink-notifier.c \
- lib/netlink-notifier.h \
- lib/netlink-protocol.h \
- lib/netlink-socket.c \
- lib/netlink-socket.h \
- lib/wmi.c \
- lib/wmi.h
-endif
-
-if HAVE_POSIX_AIO
-lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
-else
-lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
-endif
-
if HAVE_IF_DL
lib_libopenvswitch_la_SOURCES += \
lib/if-notifier-bsd.c \
@@ -547,10 +553,13 @@ lib_libopenvswitch_la_SOURCES += \
lib/route-table-bsd.c
endif
+EXTRA_DIST += \
+ lib/stdio.h.in \
+ lib/string.h.in
+
+
.PHONY: generate-dhparams-c
if HAVE_OPENSSL
-lib_libopenvswitch_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
# updates.
@@ -558,15 +567,27 @@ generate-dhparams-c:
$(AM_V_GEN)cd $(srcdir) && \
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
endif
-lib_libopenvswitch_la_SOURCES += lib/dns-resolve.h
-if HAVE_UNBOUND
-lib_libopenvswitch_la_SOURCES += lib/dns-resolve.c
-else
-lib_libopenvswitch_la_SOURCES += lib/dns-resolve-stub.c
+lib_LTLIBRARIES += lib/libsflow.la
+lib_libsflow_la_LDFLAGS = \
+ $(OVS_LTINFO) \
+ -Wl,--version-script=$(top_builddir)/lib/libsflow.sym \
+ $(AM_LDFLAGS)
+lib_libsflow_la_SOURCES = \
+ lib/sflow_api.h \
+ lib/sflow.h \
+ lib/sflow_agent.c \
+ lib/sflow_sampler.c \
+ lib/sflow_poller.c \
+ lib/sflow_receiver.c
+lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
+lib_libsflow_la_CFLAGS = $(AM_CFLAGS) -D_BSD_SOURCE -D_DEFAULT_SOURCE
+if HAVE_WNO_UNUSED
+lib_libsflow_la_CFLAGS += -Wno-unused
+endif
+if HAVE_WNO_UNUSED_PARAMETER
+lib_libsflow_la_CFLAGS += -Wno-unused-parameter
endif
pkgconfig_DATA += \
@@ -649,7 +670,7 @@ lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields include/openvswitch/me
$(AM_V_GEN)$(run_python) $< meta-flow $(srcdir)/include/openvswitch/meta-flow.h > $@.tmp
$(AM_V_at)mv $@.tmp $@
lib/meta-flow.lo: lib/meta-flow.inc
-lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields include/openvswitch/meta-flow.h
+lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields include/openvswitch/meta-flow.h
$(AM_V_GEN)$(run_python) $< nx-match $(srcdir)/include/openvswitch/meta-flow.h > $@.tmp
$(AM_V_at)mv $@.tmp $@
lib/nx-match.lo: lib/nx-match.inc
new file mode 100644
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libovscommon
+Description: Open vSwitch common library
+Version: @VERSION@
+Libs: -L${libdir} -lovscommon
+Libs.private: @LIBS@ @SSL_LIBS@ @CAPNG_LDADD@
+Cflags: -I${includedir}
new file mode 100644
@@ -0,0 +1,4 @@
+libovscommon_@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/libovscommon.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/libovscommon.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/libovscommon.la
# ovsdb-server.1
man_MANS += ovsdb/ovsdb-server.1
CLEANFILES += ovsdb/ovsdb-server.1
@@ -448,12 +448,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/libopenvswitch.la lib/libovscommon.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/libopenvswitch.la lib/libovscommon.la
# idltest schema and IDL
OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
@@ -528,11 +528,11 @@ tests_ovstest_SOURCES += \
tests/test-psample.c
endif
-tests_ovstest_LDADD = lib/libopenvswitch.la
+tests_ovstest_LDADD = lib/libopenvswitch.la lib/libovscommon.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/libopenvswitch.la lib/libovscommon.la
noinst_PROGRAMS += tests/test-strtok_r
tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
@@ -120,26 +120,29 @@ 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/libovscommon.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/libovscommon.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/libovscommon.la
utilities_ovs_ofctl_SOURCES = utilities/ovs-ofctl.c
utilities_ovs_ofctl_LDADD = \
ofproto/libofproto.la \
- lib/libopenvswitch.la
+ lib/libopenvswitch.la \
+ lib/libovscommon.la
utilities_ovs_vsctl_SOURCES = utilities/ovs-vsctl.c
-utilities_ovs_vsctl_LDADD = lib/libopenvswitch.la
+utilities_ovs_vsctl_LDADD = lib/libopenvswitch.la lib/libovscommon.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/libovscommon.la
endif
FLAKE8_PYFILES += utilities/ovs-pcap.in \
@@ -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/libovscommon.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/libovscommon.la
# ovs-vtep
scripts_SCRIPTS += \
When building userspace utilities, having all the symbols and code in a singular library is quite handy. However, the downside is that sizes will bloat under statically linked conditions. Additionally, some environments allow library constructors as code which executes before the main executable which would run even for utilities that don't need them. Split the most common code into a separate library that can be used by the ovsdb, appctl, and the openflow + datapath code that gets used by the ofctl, vsctl, dpctl, and vswitchd executables. Future work could try to split this even further (although, the dependency split in the ofp area might be difficult to untangle). Signed-off-by: Aaron Conole <aconole@redhat.com> --- NEWS | 7 +- configure.ac | 2 + debian/rules | 4 +- lib/.gitignore | 1 + lib/automake.mk | 591 +++++++++++++++++++++------------------- lib/libovscommon.pc.in | 11 + lib/libovscommon.sym.in | 4 + ovsdb/automake.mk | 6 +- tests/automake.mk | 8 +- utilities/automake.mk | 15 +- vswitchd/automake.mk | 3 +- vtep/automake.mk | 2 +- 12 files changed, 351 insertions(+), 303 deletions(-) create mode 100644 lib/libovscommon.pc.in create mode 100644 lib/libovscommon.sym.in