summaryrefslogtreecommitdiff
path: root/lib/ofp-util.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-05-12 09:58:01 -0700
committerBen Pfaff <blp@nicira.com>2011-05-12 09:58:01 -0700
commit6c1491fbd75754d2e4d5028650554f9d5d3a4958 (patch)
tree1593f6aea5ac2a851d6c8a0d06dc88cee73c3332 /lib/ofp-util.h
parent154896e3b99978317d74b5c9847fe07ec01b54b3 (diff)
downloadopenvswitch-6c1491fbd75754d2e4d5028650554f9d5d3a4958.tar.gz
Implement basic multiple table support.
This implements basic multiple table support in ofproto and supporting libraries and utilities. The design is the same as the one that has been on the Open vSwitch "wdp" branch for a long time. There is no support for multiple tables in the software switch implementation (ofproto-dpif), only a set of hooks for other switch implementations to use. To allow controllers to add flows in a particular table, Open vSwitch adds an OpenFlow 1.0 extension called NXT_FLOW_MOD_TABLE_ID.
Diffstat (limited to 'lib/ofp-util.h')
-rw-r--r--lib/ofp-util.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/ofp-util.h b/lib/ofp-util.h
index 46216a9c2..55c2c5889 100644
--- a/lib/ofp-util.h
+++ b/lib/ofp-util.h
@@ -75,6 +75,7 @@ enum ofputil_msg_code {
OFPUTIL_NXT_ROLE_REQUEST,
OFPUTIL_NXT_ROLE_REPLY,
OFPUTIL_NXT_SET_FLOW_FORMAT,
+ OFPUTIL_NXT_FLOW_MOD_TABLE_ID,
OFPUTIL_NXT_FLOW_MOD,
OFPUTIL_NXT_FLOW_REMOVED,
@@ -122,10 +123,14 @@ enum nx_flow_format ofputil_min_flow_format(const struct cls_rule *,
struct ofpbuf *ofputil_make_set_flow_format(enum nx_flow_format);
+/* NXT_FLOW_MOD_TABLE_ID extension. */
+struct ofpbuf *ofputil_make_flow_mod_table_id(bool flow_mod_table_id);
+
/* Flow format independent flow_mod. */
struct flow_mod {
struct cls_rule cr;
ovs_be64 cookie;
+ uint8_t table_id;
uint16_t command;
uint16_t idle_timeout;
uint16_t hard_timeout;
@@ -137,9 +142,10 @@ struct flow_mod {
};
int ofputil_decode_flow_mod(struct flow_mod *, const struct ofp_header *,
- enum nx_flow_format);
+ enum nx_flow_format, bool flow_mod_table_id);
struct ofpbuf *ofputil_encode_flow_mod(const struct flow_mod *,
- enum nx_flow_format);
+ enum nx_flow_format,
+ bool flow_mod_table_id);
/* Flow stats or aggregate stats request, independent of flow format. */
struct flow_stats_request {