Skip to content

Commit

Permalink
Move lib/ofp-util.h to include/openvswitch directory
Browse files Browse the repository at this point in the history
This commit also adds several #include directives in source files in
order to make the 'ofp-util.h' move possible

Signed-off-by: Ben Warren <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
Ben Warren authored and blp committed Apr 14, 2016
1 parent ae06a56 commit f424833
Show file tree
Hide file tree
Showing 50 changed files with 58 additions and 48 deletions.
2 changes: 1 addition & 1 deletion OPENFLOW-1.1+.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The primary approach to compatibility is to abstract most of the
details of the differences from the core code, by adding a protocol
layer that translates between OF1.x and a slightly higher-level
abstract representation. The core of this approach is the many struct
ofputil_* structures in lib/ofp-util.h.
ofputil_* structures in include/openvswitch/ofp-util.h.

As a consequence of this approach, OVS cannot use OpenFlow protocol
definitions that closely resemble those in the OpenFlow specification,
Expand Down
1 change: 1 addition & 0 deletions include/openvswitch/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ openvswitchinclude_HEADERS = \
include/openvswitch/ofpbuf.h \
include/openvswitch/ofp-errors.h \
include/openvswitch/ofp-parse.h \
include/openvswitch/ofp-util.h \
include/openvswitch/packets.h \
include/openvswitch/thread.h \
include/openvswitch/token-bucket.h \
Expand Down
11 changes: 5 additions & 6 deletions lib/ofp-util.h → include/openvswitch/ofp-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,23 @@
* limitations under the License.
*/

#ifndef OFP_UTIL_H
#define OFP_UTIL_H 1
#ifndef OPENVSWITCH_OFP_UTIL_H
#define OPENVSWITCH_OFP_UTIL_H 1

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "bitmap.h"
#include "compiler.h"
#include "openvswitch/flow.h"
#include "openvswitch/list.h"
#include "openvswitch/match.h"
#include "openvswitch/meta-flow.h"
#include "netdev.h"
#include "openvswitch/netdev.h"
#include "openflow/netronome-ext.h"
#include "openflow/nicira-ext.h"
#include "openvswitch/ofpbuf.h"
#include "openvswitch/types.h"
#include "openvswitch/type-props.h"
#include "uuid.h"
#include "openvswitch/uuid.h"

struct ofpbuf;
union ofp_action;
Expand Down
1 change: 0 additions & 1 deletion lib/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ lib_libopenvswitch_la_SOURCES = \
lib/ofp-prop.c \
lib/ofp-prop.h \
lib/ofp-util.c \
lib/ofp-util.h \
lib/ofp-version-opt.h \
lib/ofp-version-opt.c \
lib/ofpbuf.c \
Expand Down
2 changes: 1 addition & 1 deletion lib/bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "nx-match.h"
#include "openvswitch/ofpbuf.h"
#include "ofp-actions.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openflow/nicira-ext.h"
#include "openvswitch/ofp-errors.h"
#include "openvswitch/vlog.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/classifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "byte-order.h"
#include "openvswitch/dynamic-string.h"
#include "odp-util.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "packets.h"
#include "util.h"
#include "openvswitch/vlog.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/dpif.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "odp-execute.h"
#include "odp-util.h"
#include "ofp-print.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "packets.h"
#include "poll-loop.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/learn.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "openvswitch/meta-flow.h"
#include "nx-match.h"
#include "ofp-actions.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openflow/openflow.h"
#include "openvswitch/ofp-errors.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/learning-switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "ofp-actions.h"
#include "ofp-msgs.h"
#include "ofp-print.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openflow/openflow.h"
#include "poll-loop.h"
#include "rconn.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/learning-switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"

struct ofpbuf;
struct rconn;
Expand Down
2 changes: 1 addition & 1 deletion lib/match.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "byte-order.h"
#include "colors.h"
#include "openvswitch/dynamic-string.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "packets.h"
#include "tun-metadata.h"

Expand Down
2 changes: 1 addition & 1 deletion lib/meta-flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "classifier.h"
#include "openvswitch/dynamic-string.h"
#include "nx-match.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "ovs-thread.h"
#include "packets.h"
#include "random.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/multipath.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "openvswitch/dynamic-string.h"
#include "nx-match.h"
#include "ofp-actions.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofp-errors.h"
#include "openflow/nicira-ext.h"
#include "packets.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/nx-match.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "hmap.h"
#include "openvswitch/meta-flow.h"
#include "ofp-actions.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openflow/nicira-ext.h"
#include "packets.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "nx-match.h"
#include "odp-netlink.h"
#include "ofp-prop.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "unaligned.h"
#include "util.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <stddef.h>
#include <stdint.h>
#include "openvswitch/meta-flow.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openflow/openflow.h"
#include "openflow/nicira-ext.h"
#include "openvswitch/ofp-errors.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "byte-order.h"
#include "openvswitch/dynamic-string.h"
#include "ofp-msgs.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openflow/openflow.h"
#include "openvswitch/ofp-errors.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "netdev.h"
#include "nx-match.h"
#include "ofp-actions.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openflow/openflow.h"
#include "ovs-thread.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-print.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "ofp-actions.h"
#include "openvswitch/ofpbuf.h"
#include "ofp-msgs.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openflow/openflow.h"
#include "openflow/nicira-ext.h"
#include "openvswitch/ofp-errors.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "ofp-actions.h"
#include "ofp-msgs.h"
#include "ofp-prop.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openflow/netronome-ext.h"
#include "packets.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-version-opt.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <config.h>
#include "openvswitch/dynamic-string.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "ofp-version-opt.h"
#include "ovs-thread.h"

Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-version-opt.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <openflow/openflow-common.h>
#include "util.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"

#define OFP_VERSION_LONG_OPTIONS \
{"version", no_argument, NULL, 'V'}, \
Expand Down
2 changes: 1 addition & 1 deletion lib/pktbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <inttypes.h>
#include <stdlib.h>
#include "coverage.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "dp-packet.h"
#include "timeval.h"
#include "util.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/rconn.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <string.h>
#include "coverage.h"
#include "ofp-msgs.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openflow/openflow.h"
#include "poll-loop.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/tun-metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "openvswitch/match.h"
#include "nx-match.h"
#include "odp-netlink.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "ovs-thread.h"
#include "ovs-rcu.h"
#include "packets.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/vconn.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "flow.h"
#include "ofp-msgs.h"
#include "ofp-print.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openflow/nicira-ext.h"
#include "openflow/openflow.h"
Expand Down
2 changes: 1 addition & 1 deletion ofproto/bond.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <stdlib.h>
#include <math.h>

#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "ofp-actions.h"
#include "openvswitch/ofpbuf.h"
#include "ofproto/ofproto-provider.h"
Expand Down
2 changes: 1 addition & 1 deletion ofproto/bundles.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "odp-util.h"
#include "ofp-actions.h"
#include "ofp-msgs.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "ofproto-provider.h"
#include "pinsched.h"
Expand Down
2 changes: 1 addition & 1 deletion ofproto/bundles.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "connmgr.h"
#include "ofp-msgs.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "ofproto-provider.h"
#include "util.h"

Expand Down
2 changes: 1 addition & 1 deletion ofproto/connmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "odp-util.h"
#include "ofp-actions.h"
#include "ofp-msgs.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "ofproto-provider.h"
#include "pinsched.h"
Expand Down
2 changes: 1 addition & 1 deletion ofproto/connmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "hmap.h"
#include "openvswitch/list.h"
#include "openvswitch/match.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "ofproto.h"
#include "ofproto-provider.h"
#include "openflow/nicira-ext.h"
Expand Down
2 changes: 1 addition & 1 deletion ofproto/fail-open.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "odp-util.h"
#include "openvswitch/ofpbuf.h"
#include "ofp-actions.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "ofproto.h"
#include "ofproto-provider.h"
#include "pktbuf.h"
Expand Down
1 change: 1 addition & 0 deletions ofproto/ofproto-dpif-ipfix.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "flow.h"
#include "hash.h"
#include "hmap.h"
#include "netdev.h"
#include "openvswitch/list.h"
#include "openvswitch/ofpbuf.h"
#include "ofproto.h"
Expand Down
2 changes: 1 addition & 1 deletion ofproto/ofproto-dpif.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include "nx-match.h"
#include "odp-util.h"
#include "odp-execute.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "ofp-actions.h"
#include "ofp-print.h"
Expand Down
2 changes: 1 addition & 1 deletion ofproto/ofproto-dpif.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "fail-open.h"
#include "hmapx.h"
#include "odp-util.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "ovs-thread.h"
#include "ofproto-provider.h"
#include "timer.h"
Expand Down
2 changes: 1 addition & 1 deletion ofproto/ofproto-provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "hindex.h"
#include "openvswitch/list.h"
#include "ofp-actions.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "ofproto/ofproto.h"
#include "openvswitch/ofp-errors.h"
#include "ovs-atomic.h"
Expand Down
2 changes: 1 addition & 1 deletion ofproto/ofproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "ofp-actions.h"
#include "ofp-msgs.h"
#include "ofp-print.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "ofproto-provider.h"
#include "openflow/nicira-ext.h"
Expand Down
5 changes: 4 additions & 1 deletion ovn/controller/ofctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,25 @@
*/

#include <config.h>
#include "byte-order.h"
#include "ofctrl.h"
#include "dirs.h"
#include "hash.h"
#include "openvswitch/dynamic-string.h"
#include "hmap.h"
#include "openvswitch/match.h"
#include "ofp-actions.h"
#include "ofp-msgs.h"
#include "ofp-print.h"
#include "ofp-util.h"
#include "openvswitch/ofp-util.h"
#include "openvswitch/ofpbuf.h"
#include "openflow/openflow.h"
#include "openvswitch/vlog.h"
#include "ovn-controller.h"
#include "physical.h"
#include "rconn.h"
#include "socket-util.h"
#include "util.h"
#include "vswitch-idl.h"

VLOG_DEFINE_THIS_MODULE(ofctrl);
Expand Down
2 changes: 2 additions & 0 deletions ovn/controller/physical.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

#include <config.h>
#include "physical.h"
#include "byte-order.h"
#include "flow.h"
#include "lflow.h"
#include "openvswitch/match.h"
#include "ofctrl.h"
Expand Down
Loading

0 comments on commit f424833

Please sign in to comment.