From: Ben Warren <[email protected]> This patch set is a first stab at making a 'dev' distribution for OpenVswitch The goal is to provide shared libraries and header files so that third party applications can link in OVS rather than always using the command line utilities.
Changes in V2: - Work to move all of ofp-util to public include directory - Rebased against TOT Design: Two patterns have been created: - some header files have been broken up into private (lib dir) and public (include/openvswitch dir). - some header files have been moved from 'lib' to 'include/openvswitch'. All header files in 'include' are considered appropriate for third-party inclusion. Caveats: - The header files that have been moved to 'include/openvswitch' are the ones that I'm using in my current project. I'm willing to do the work to move others, but am looking for direction on what should be moved. - Little effort has gone into restricting the list of objects that are exported. All public functions make it into the appropriate .so libraries - This is geared towards Debian, although there's nothing Debian-specific in the reworking of header files. - In the Debian 'openvswitch-common' package, all command line utilities are now dynamically-linked agains libopenvswitch.so - This has only been tested on Linux, although I have it running both against an x86_64 target as well as cross-compiled for MIPS64 (Cavium). - I'm a newbie with Debian packaging, which you'll find out if you build this. While the code compiles, links and runs, there are a ton of 'dpkg-shlibdeps' warnings, but I don't know the best practice for declaring symbols. - I'm unsure how to version the dynamic libraries. I guess start with 1.0.0? Going Forward: - While the code and macros in 'list.h' have pretty good namespace protection, we should probably do some work on 'util.h', and I'm sure there are others. - Maybe we should add explicit namespace to the files in 'include'? Ben Warren (23): Move ofp-parse.h to include/openvswitch directory Move lib/geneve.h to include/openvswitch directory Move lib/ofp-errors.h to include/openvswitch directory Move contents of lib/list.h to include/openvswitch directory Remove lib/list.h completely Move lib/dynamic-string.h to include/openvswitch directory Move lib/ofpbuf.h to include/openvswitch directory Move BLDASSERT macros to compiler header file Break tun-metadata.h into private and public parts Misc cleanup with "util.h" header files Break packets.h into private and public parts Break flow.h into private and public parts Move lib/match.h to include/openvswitch directory Remove inter-header dependencies in OVN files Move lib/meta-flow.h to include/openvswitch directory Break uuid.h into private and public parts Move lib/type-props.h to include/openvswitch directory Move another macro to include/openvswitch/util.h Break netdev.h into private and public parts Assorted #include additions Move lib/ofp-util.h to include/openvswitch directory Debian: build openvswitch as shared libraries Debian: add libopenvswitch-dev build target FAQ.md | 2 +- OPENFLOW-1.1+.md | 2 +- build-aux/extract-ofp-errors | 4 +- debian/automake.mk | 1 + debian/control | 15 + debian/libopenvswitch-dev.install | 5 + debian/openvswitch-common.install | 3 + debian/rules | 5 +- include/openvswitch/automake.mk | 14 + include/openvswitch/compiler.h | 33 + include/openvswitch/dynamic-string.h | 93 ++ include/openvswitch/flow.h | 197 +++ include/openvswitch/geneve.h | 63 + include/openvswitch/list.h | 260 ++++ include/openvswitch/match.h | 210 +++ include/openvswitch/meta-flow.h | 2045 +++++++++++++++++++++++++++++ include/openvswitch/netdev.h | 87 ++ include/openvswitch/ofp-errors.h | 807 ++++++++++++ include/openvswitch/ofp-parse.h | 106 ++ include/openvswitch/ofp-util.h | 1419 ++++++++++++++++++++ include/openvswitch/ofpbuf.h | 277 ++++ include/openvswitch/packets.h | 64 + include/openvswitch/tun-metadata.h | 101 ++ include/openvswitch/type-props.h | 55 + include/openvswitch/util.h | 149 +++ include/openvswitch/uuid.h | 35 + lib/automake.mk | 18 +- lib/backtrace.h | 2 +- lib/bfd.c | 6 +- lib/bundle.c | 10 +- lib/bundle.h | 2 +- lib/cfm.c | 2 +- lib/classifier.c | 4 +- lib/classifier.h | 6 +- lib/command-line.c | 2 +- lib/coverage.c | 2 +- lib/db-ctl-base.c | 2 +- lib/db-ctl-base.h | 2 +- lib/dp-packet.c | 2 +- lib/dp-packet.h | 2 +- lib/dpctl.c | 8 +- lib/dpif-netdev.c | 8 +- lib/dpif-netlink.c | 4 +- lib/dpif.c | 8 +- lib/dynamic-string.c | 2 +- lib/dynamic-string.h | 93 -- lib/fat-rwlock.c | 2 +- lib/fat-rwlock.h | 2 +- lib/fatal-signal.c | 2 +- lib/flow.c | 4 +- lib/flow.h | 175 +-- lib/geneve.h | 63 - lib/guarded-list.h | 2 +- lib/json.c | 2 +- lib/jsonrpc.c | 6 +- lib/lacp.c | 2 +- lib/learn.c | 12 +- lib/learn.h | 2 +- lib/learning-switch.c | 8 +- lib/learning-switch.h | 2 +- lib/list.h | 280 ---- lib/lldp/aa-structs.h | 2 +- lib/lldp/lldpd.c | 2 +- lib/lldp/lldpd.h | 2 +- lib/mac-learning.c | 2 +- lib/mac-learning.h | 2 +- lib/match.c | 7 +- lib/match.h | 212 --- lib/mcast-snooping.c | 2 +- lib/mcast-snooping.h | 2 +- lib/memory.c | 2 +- lib/meta-flow.c | 8 +- lib/meta-flow.h | 2041 ---------------------------- lib/multipath.c | 6 +- lib/multipath.h | 2 +- lib/netdev-bsd.c | 2 +- lib/netdev-dpdk.c | 2 +- lib/netdev-dummy.c | 6 +- lib/netdev-linux.c | 4 +- lib/netdev-provider.h | 2 +- lib/netdev-vport.c | 4 +- lib/netdev-windows.c | 2 +- lib/netdev.c | 4 +- lib/netdev.h | 66 +- lib/netlink-conntrack.c | 4 +- lib/netlink-conntrack.h | 4 +- lib/netlink-notifier.c | 2 +- lib/netlink-notifier.h | 2 +- lib/netlink-socket.c | 4 +- lib/netlink-socket.h | 2 +- lib/netlink.c | 2 +- lib/nx-match.c | 10 +- lib/nx-match.h | 4 +- lib/odp-util.c | 4 +- lib/ofp-actions.c | 10 +- lib/ofp-actions.h | 6 +- lib/ofp-errors.c | 8 +- lib/ofp-errors.h | 807 ------------ lib/ofp-msgs.c | 4 +- lib/ofp-msgs.h | 2 +- lib/ofp-parse.c | 11 +- lib/ofp-parse.h | 106 -- lib/ofp-print.c | 13 +- lib/ofp-prop.c | 4 +- lib/ofp-prop.h | 2 +- lib/ofp-util.c | 13 +- lib/ofp-util.h | 1420 -------------------- lib/ofp-version-opt.c | 4 +- lib/ofp-version-opt.h | 2 +- lib/ofpbuf.c | 4 +- lib/ofpbuf.h | 275 ---- lib/ovs-lldp.c | 4 +- lib/ovs-lldp.h | 2 +- lib/ovs-numa.c | 2 +- lib/ovs-numa.h | 2 +- lib/ovs-rcu.c | 2 +- lib/ovs-router.c | 2 +- lib/ovs-thread.c | 2 +- lib/ovsdb-data.c | 2 +- lib/ovsdb-error.c | 2 +- lib/ovsdb-idl-provider.h | 2 +- lib/ovsdb-idl.c | 2 +- lib/ovsdb-types.c | 2 +- lib/packets.c | 2 +- lib/packets.h | 45 +- lib/perf-counter.c | 2 +- lib/pktbuf.c | 2 +- lib/pktbuf.h | 2 +- lib/poll-loop.c | 4 +- lib/process.c | 4 +- lib/rconn.c | 4 +- lib/route-table.c | 2 +- lib/rstp-common.h | 2 +- lib/rstp-state-machines.c | 2 +- lib/rstp.c | 2 +- lib/rtbsd.h | 2 +- lib/rtnetlink.c | 3 +- lib/seq.c | 2 +- lib/signals.c | 2 +- lib/signals.h | 2 +- lib/socket-util.c | 2 +- lib/stp.c | 2 +- lib/stream-ssl.c | 4 +- lib/stream-tcp.c | 2 +- lib/stream.c | 4 +- lib/svec.c | 2 +- lib/syslog-direct.c | 2 +- lib/syslog-libc.c | 2 +- lib/table.c | 2 +- lib/timeval.c | 2 +- lib/timeval.h | 2 +- lib/tnl-neigh-cache.c | 2 +- lib/tnl-ports.c | 6 +- lib/tun-metadata.c | 4 +- lib/tun-metadata.h | 84 +- lib/type-props.h | 55 - lib/unaligned.h | 2 +- lib/unicode.c | 2 +- lib/unixctl.c | 4 +- lib/util.h | 179 --- lib/uuid.h | 19 +- lib/vconn-stream.c | 2 +- lib/vconn.c | 8 +- lib/vlog.c | 4 +- ofproto/bond.c | 12 +- ofproto/bundles.c | 4 +- ofproto/bundles.h | 2 +- ofproto/connmgr.c | 6 +- ofproto/connmgr.h | 8 +- ofproto/fail-open.c | 4 +- ofproto/in-band.c | 2 +- ofproto/netflow.c | 2 +- ofproto/ofproto-dpif-ipfix.c | 5 +- ofproto/ofproto-dpif-monitor.c | 2 +- ofproto/ofproto-dpif-rid.c | 2 +- ofproto/ofproto-dpif-rid.h | 2 +- ofproto/ofproto-dpif-sflow.c | 2 +- ofproto/ofproto-dpif-upcall.c | 6 +- ofproto/ofproto-dpif-xlate.c | 6 +- ofproto/ofproto-dpif-xlate.h | 4 +- ofproto/ofproto-dpif.c | 10 +- ofproto/ofproto-dpif.h | 2 +- ofproto/ofproto-provider.h | 6 +- ofproto/ofproto.c | 10 +- ofproto/ofproto.h | 2 +- ofproto/pinsched.c | 2 +- ofproto/tunnel.c | 4 +- ovn/controller-vtep/ovn-controller-vtep.c | 2 +- ovn/controller/chassis.c | 2 +- ovn/controller/lflow.c | 4 +- ovn/controller/ofctrl.c | 11 +- ovn/controller/ofctrl.h | 2 +- ovn/controller/ovn-controller.c | 4 +- ovn/controller/physical.c | 6 +- ovn/controller/physical.h | 2 +- ovn/controller/pinctrl.c | 2 +- ovn/controller/pinctrl.h | 2 +- ovn/lib/actions.c | 4 +- ovn/lib/expr.c | 5 +- ovn/lib/expr.h | 6 +- ovn/lib/lex.c | 2 +- ovn/lib/lex.h | 2 +- ovn/lib/logical-fields.h | 2 +- ovn/northd/ovn-northd.c | 3 +- ovn/utilities/ovn-sbctl.c | 2 +- ovsdb/column.c | 2 +- ovsdb/jsonrpc-server.c | 2 +- ovsdb/monitor.c | 2 +- ovsdb/ovsdb-client.c | 2 +- ovsdb/ovsdb-server.c | 4 +- ovsdb/ovsdb-tool.c | 2 +- ovsdb/ovsdb.h | 2 +- ovsdb/row.c | 2 +- ovsdb/row.h | 2 +- ovsdb/server.h | 2 +- ovsdb/transaction.c | 4 +- ovsdb/trigger.h | 2 +- tests/ovstest.c | 2 +- tests/test-bundle.c | 2 +- tests/test-classifier.c | 2 +- tests/test-flows.c | 4 +- tests/test-list.c | 5 +- tests/test-netflow.c | 4 +- tests/test-odp.c | 8 +- tests/test-ofpbuf.c | 2 +- tests/test-ovn.c | 7 +- tests/test-ovsdb.c | 3 +- tests/test-rstp.c | 2 +- tests/test-sflow.c | 4 +- tests/test-stp.c | 2 +- tests/test-type-props.c | 2 +- tests/test-uuid.c | 1 + tests/test-vconn.c | 4 +- utilities/nlmon.c | 2 +- utilities/ovs-appctl.c | 2 +- utilities/ovs-dpctl.c | 2 +- utilities/ovs-ofctl.c | 12 +- utilities/ovs-testcontroller.c | 6 +- utilities/ovs-vsctl.c | 2 +- vswitchd/bridge.c | 10 +- vswitchd/system-stats.c | 4 +- vswitchd/xenserver.c | 2 +- vtep/vtep-ctl.c | 2 +- 243 files changed, 6431 insertions(+), 6284 deletions(-) create mode 100644 debian/libopenvswitch-dev.install create mode 100644 include/openvswitch/dynamic-string.h create mode 100644 include/openvswitch/flow.h create mode 100644 include/openvswitch/geneve.h create mode 100644 include/openvswitch/match.h create mode 100644 include/openvswitch/meta-flow.h create mode 100644 include/openvswitch/netdev.h create mode 100644 include/openvswitch/ofp-errors.h create mode 100644 include/openvswitch/ofp-parse.h create mode 100644 include/openvswitch/ofp-util.h create mode 100644 include/openvswitch/ofpbuf.h create mode 100644 include/openvswitch/packets.h create mode 100644 include/openvswitch/tun-metadata.h create mode 100644 include/openvswitch/type-props.h create mode 100644 include/openvswitch/uuid.h delete mode 100644 lib/dynamic-string.h delete mode 100644 lib/geneve.h delete mode 100644 lib/list.h delete mode 100644 lib/match.h delete mode 100644 lib/meta-flow.h delete mode 100644 lib/ofp-errors.h delete mode 100644 lib/ofp-parse.h delete mode 100644 lib/ofp-util.h delete mode 100644 lib/ofpbuf.h delete mode 100644 lib/type-props.h -- 2.5.0 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
