From: Ben Warren <b...@skyportsystems.com> 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.
Design: Nothing too exotic here - 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. - No effort has gone into restricting the list of objects that are exported. All public functions make it into the appropriate .so libraries - There may not seem to be much rhyme or reason as to the ordering of #include directives in source files. My OCD pushes me towards always using a particular pattern, usually alphabetic with files in directories going first, but many of changes I made here were done using 'sed -i' which doesn't affect line ordering. I'd gladly fix these up if anybody has a preference, but there didn't seem to be any obvious rules in place. - 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 (9): 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 Debian: build openvswitch as shared libraries Debian: add libopenvswitch-dev build target FAQ.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 | 5 + include/openvswitch/dynamic-string.h | 93 ++++ include/openvswitch/geneve.h | 63 +++ include/openvswitch/list.h | 260 ++++++++++ include/openvswitch/ofp-errors.h | 803 ++++++++++++++++++++++++++++++ include/openvswitch/ofp-parse.h | 106 ++++ include/openvswitch/ofpbuf.h | 277 +++++++++++ include/openvswitch/util.h | 101 ++++ lib/automake.mk | 10 +- lib/backtrace.h | 2 +- lib/bfd.c | 6 +- lib/bundle.c | 6 +- lib/bundle.h | 2 +- lib/cfm.c | 2 +- lib/classifier.c | 2 +- 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 | 6 +- lib/dpif-netdev.c | 6 +- lib/dpif-netlink.c | 4 +- lib/dpif.c | 6 +- lib/dynamic-string.c | 2 +- lib/dynamic-string.h | 93 ---- lib/fat-rwlock.c | 2 +- lib/fat-rwlock.h | 2 +- lib/flow.c | 2 +- lib/geneve.h | 63 --- lib/guarded-list.h | 2 +- lib/json.c | 2 +- lib/jsonrpc.c | 6 +- lib/lacp.c | 2 +- lib/learn.c | 6 +- lib/learn.h | 2 +- lib/learning-switch.c | 6 +- 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 | 2 +- lib/mcast-snooping.c | 2 +- lib/mcast-snooping.h | 2 +- lib/memory.c | 2 +- lib/meta-flow.c | 4 +- lib/meta-flow.h | 2 +- lib/multipath.c | 4 +- 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/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 | 6 +- lib/nx-match.h | 2 +- lib/odp-util.c | 4 +- lib/ofp-actions.c | 6 +- lib/ofp-actions.h | 2 +- lib/ofp-errors.c | 6 +- lib/ofp-errors.h | 803 ------------------------------ lib/ofp-msgs.c | 4 +- lib/ofp-msgs.h | 2 +- lib/ofp-parse.c | 7 +- lib/ofp-parse.h | 107 ---- lib/ofp-print.c | 6 +- lib/ofp-prop.c | 4 +- lib/ofp-prop.h | 2 +- lib/ofp-util.c | 6 +- lib/ofp-util.h | 2 +- lib/ofp-version-opt.c | 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 | 2 +- lib/perf-counter.c | 2 +- lib/pktbuf.h | 2 +- lib/poll-loop.c | 4 +- lib/process.c | 4 +- lib/rconn.c | 2 +- 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/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/tnl-neigh-cache.c | 2 +- lib/tnl-ports.c | 6 +- lib/tun-metadata.h | 6 +- lib/unicode.c | 2 +- lib/unixctl.c | 4 +- lib/util.h | 100 ---- lib/vconn-stream.c | 2 +- lib/vconn.c | 6 +- lib/vlog.c | 4 +- ofproto/bond.c | 8 +- ofproto/bundles.c | 2 +- ofproto/connmgr.c | 4 +- ofproto/connmgr.h | 4 +- ofproto/fail-open.c | 2 +- ofproto/in-band.c | 2 +- ofproto/netflow.c | 2 +- ofproto/ofproto-dpif-ipfix.c | 4 +- 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 | 4 +- ofproto/ofproto-dpif-xlate.h | 2 +- ofproto/ofproto-dpif.c | 6 +- ofproto/ofproto-provider.h | 4 +- ofproto/ofproto.c | 6 +- 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 | 4 +- ovn/controller/ovn-controller.c | 2 +- ovn/controller/physical.c | 2 +- ovn/lib/actions.c | 4 +- ovn/lib/expr.c | 2 +- ovn/lib/expr.h | 2 +- ovn/lib/lex.c | 2 +- ovn/northd/ovn-northd.c | 2 +- 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-flows.c | 2 +- tests/test-list.c | 5 +- tests/test-netflow.c | 4 +- tests/test-odp.c | 6 +- tests/test-ofpbuf.c | 2 +- tests/test-ovn.c | 4 +- tests/test-ovsdb.c | 2 +- tests/test-rstp.c | 2 +- tests/test-sflow.c | 4 +- tests/test-stp.c | 2 +- tests/test-vconn.c | 2 +- utilities/nlmon.c | 2 +- utilities/ovs-appctl.c | 2 +- utilities/ovs-dpctl.c | 2 +- utilities/ovs-ofctl.c | 8 +- utilities/ovs-testcontroller.c | 4 +- utilities/ovs-vsctl.c | 2 +- vswitchd/bridge.c | 6 +- vswitchd/system-stats.c | 4 +- vswitchd/xenserver.c | 2 +- vtep/vtep-ctl.c | 2 +- 205 files changed, 2014 insertions(+), 2005 deletions(-) create mode 100644 debian/libopenvswitch-dev.install create mode 100644 include/openvswitch/dynamic-string.h create mode 100644 include/openvswitch/geneve.h create mode 100644 include/openvswitch/ofp-errors.h create mode 100644 include/openvswitch/ofp-parse.h create mode 100644 include/openvswitch/ofpbuf.h delete mode 100644 lib/dynamic-string.h delete mode 100644 lib/geneve.h delete mode 100644 lib/list.h delete mode 100644 lib/ofp-errors.h delete mode 100644 lib/ofp-parse.h delete mode 100644 lib/ofpbuf.h -- 2.5.0 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev