From ee89ea7b477bb4fd05137de03b2e8443807ed9f4 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Tue, 12 Jul 2016 16:37:34 -0500 Subject: json: Move from lib to include/openvswitch. To easily allow both in- and out-of-tree building of the Python wrapper for the OVS JSON parser (e.g. w/ pip), move json.h to include/openvswitch. This also requires moving lib/{hmap,shash}.h. Both hmap.h and shash.h were #include-ing "util.h" even though the headers themselves did not use anything from there, but rather from include/openvswitch/util.h. Fixing that required including util.h in several C files mostly due to OVS_NOT_REACHED and things like xmalloc. Signed-off-by: Terry Wilson Signed-off-by: Ben Pfaff --- ofproto/bond.c | 5 +++-- ofproto/bundles.c | 2 +- ofproto/connmgr.c | 3 ++- ofproto/connmgr.h | 2 +- ofproto/ofproto-dpif-ipfix.c | 2 +- ofproto/ofproto-dpif-mirror.c | 2 +- ofproto/ofproto-dpif-monitor.c | 2 +- ofproto/ofproto-dpif-sflow.c | 2 +- ofproto/ofproto-dpif-xlate.c | 1 + ofproto/ofproto-dpif.c | 1 + ofproto/ofproto-provider.h | 2 +- ofproto/ofproto.c | 5 +++-- ofproto/pinsched.c | 2 +- ofproto/tunnel.c | 2 +- 14 files changed, 19 insertions(+), 14 deletions(-) (limited to 'ofproto') diff --git a/ofproto/bond.c b/ofproto/bond.c index 032b8f61d..1d0c3ce3f 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -27,7 +27,7 @@ #include "coverage.h" #include "dp-packet.h" #include "flow.h" -#include "hmap.h" +#include "openvswitch/hmap.h" #include "lacp.h" #include "netdev.h" #include "odp-util.h" @@ -44,9 +44,10 @@ #include "packets.h" #include "poll-loop.h" #include "seq.h" -#include "shash.h" +#include "openvswitch/shash.h" #include "timeval.h" #include "unixctl.h" +#include "util.h" VLOG_DEFINE_THIS_MODULE(bond); diff --git a/ofproto/bundles.c b/ofproto/bundles.c index 232cc15e0..aa8e58cab 100644 --- a/ofproto/bundles.c +++ b/ofproto/bundles.c @@ -34,7 +34,7 @@ #include "poll-loop.h" #include "pktbuf.h" #include "rconn.h" -#include "shash.h" +#include "openvswitch/shash.h" #include "simap.h" #include "stream.h" #include "timeval.h" diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 0c48b7785..d70d9902c 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -36,10 +36,11 @@ #include "poll-loop.h" #include "pktbuf.h" #include "rconn.h" -#include "shash.h" +#include "openvswitch/shash.h" #include "simap.h" #include "stream.h" #include "timeval.h" +#include "util.h" VLOG_DEFINE_THIS_MODULE(connmgr); static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); diff --git a/ofproto/connmgr.h b/ofproto/connmgr.h index 30e7ae52c..be4ce2894 100644 --- a/ofproto/connmgr.h +++ b/ofproto/connmgr.h @@ -18,7 +18,7 @@ #define CONNMGR_H 1 #include "classifier.h" -#include "hmap.h" +#include "openvswitch/hmap.h" #include "openvswitch/list.h" #include "openvswitch/match.h" #include "openvswitch/ofp-util.h" diff --git a/ofproto/ofproto-dpif-ipfix.c b/ofproto/ofproto-dpif-ipfix.c index 5744abbcb..0128c91a6 100644 --- a/ofproto/ofproto-dpif-ipfix.c +++ b/ofproto/ofproto-dpif-ipfix.c @@ -21,7 +21,7 @@ #include "collectors.h" #include "flow.h" #include "hash.h" -#include "hmap.h" +#include "openvswitch/hmap.h" #include "netdev.h" #include "openvswitch/list.h" #include "openvswitch/ofpbuf.h" diff --git a/ofproto/ofproto-dpif-mirror.c b/ofproto/ofproto-dpif-mirror.c index 84b784589..675adf300 100644 --- a/ofproto/ofproto-dpif-mirror.c +++ b/ofproto/ofproto-dpif-mirror.c @@ -18,7 +18,7 @@ #include -#include "hmap.h" +#include "openvswitch/hmap.h" #include "hmapx.h" #include "ofproto.h" #include "vlan-bitmap.h" diff --git a/ofproto/ofproto-dpif-monitor.c b/ofproto/ofproto-dpif-monitor.c index 11d7a54ba..623d51706 100644 --- a/ofproto/ofproto-dpif-monitor.c +++ b/ofproto/ofproto-dpif-monitor.c @@ -25,7 +25,7 @@ #include "guarded-list.h" #include "hash.h" #include "heap.h" -#include "hmap.h" +#include "openvswitch/hmap.h" #include "latch.h" #include "openvswitch/ofpbuf.h" #include "ofproto-dpif.h" diff --git a/ofproto/ofproto-dpif-sflow.c b/ofproto/ofproto-dpif-sflow.c index 7d0aa36f0..8a19d1584 100644 --- a/ofproto/ofproto-dpif-sflow.c +++ b/ofproto/ofproto-dpif-sflow.c @@ -26,7 +26,7 @@ #include "compiler.h" #include "dpif.h" #include "hash.h" -#include "hmap.h" +#include "openvswitch/hmap.h" #include "netdev.h" #include "netlink.h" #include "openvswitch/ofpbuf.h" diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 3ff7a6b66..160da5b9d 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -59,6 +59,7 @@ #include "tnl-neigh-cache.h" #include "tnl-ports.h" #include "tunnel.h" +#include "util.h" COVERAGE_DEFINE(xlate_actions); COVERAGE_DEFINE(xlate_actions_oversize); diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index ce9383ad4..faff1c757 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -68,6 +68,7 @@ #include "tunnel.h" #include "unaligned.h" #include "unixctl.h" +#include "util.h" #include "vlan-bitmap.h" VLOG_DEFINE_THIS_MODULE(ofproto_dpif); diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h index ae6c08dde..25f8dc0f4 100644 --- a/ofproto/ofproto-provider.h +++ b/ofproto/ofproto-provider.h @@ -46,7 +46,7 @@ #include "ovs-atomic.h" #include "ovs-rcu.h" #include "ovs-thread.h" -#include "shash.h" +#include "openvswitch/shash.h" #include "simap.h" #include "timeval.h" diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 5f84aa181..dcb0a0847 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -31,7 +31,7 @@ #include "coverage.h" #include "dp-packet.h" #include "hash.h" -#include "hmap.h" +#include "openvswitch/hmap.h" #include "netdev.h" #include "nx-match.h" #include "ofproto.h" @@ -54,7 +54,7 @@ #include "poll-loop.h" #include "random.h" #include "seq.h" -#include "shash.h" +#include "openvswitch/shash.h" #include "simap.h" #include "smap.h" #include "sset.h" @@ -62,6 +62,7 @@ #include "tun-metadata.h" #include "unaligned.h" #include "unixctl.h" +#include "util.h" VLOG_DEFINE_THIS_MODULE(ofproto); diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c index ee252f4f9..51f176050 100644 --- a/ofproto/pinsched.c +++ b/ofproto/pinsched.c @@ -23,7 +23,7 @@ #include #include "flow.h" #include "hash.h" -#include "hmap.h" +#include "openvswitch/hmap.h" #include "openvswitch/ofpbuf.h" #include "openflow/openflow.h" #include "poll-loop.h" diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c index 85a485cd2..9a69071c0 100644 --- a/ofproto/tunnel.c +++ b/ofproto/tunnel.c @@ -24,7 +24,7 @@ #include "openvswitch/dynamic-string.h" #include "fat-rwlock.h" #include "hash.h" -#include "hmap.h" +#include "openvswitch/hmap.h" #include "netdev.h" #include "odp-util.h" #include "openvswitch/ofpbuf.h" -- cgit v1.2.1