[ovs-dev] [PATCH 06/17] ofproto: ofproto_run(): Paramatise Open Flow version
Simon Horman
horms at verge.net.au
Thu Oct 4 02:41:21 UTC 2012
Signed-off-by: Simon Horman <horms at verge.net.au>
---
ofproto/ofproto.c | 9 +++++----
ofproto/ofproto.h | 3 ++-
vswitchd/bridge.c | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 83c6125..84c18e0 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -1066,7 +1066,8 @@ process_port_change(struct ofproto *ofproto, int error, char *devname)
}
int
-ofproto_run(struct ofproto *p)
+ofproto_run(struct ofproto *p, enum ofp_version min_version,
+ enum ofp_version max_version)
{
struct sset changed_netdevs;
const char *changed_netdev;
@@ -1107,11 +1108,11 @@ ofproto_run(struct ofproto *p)
switch (p->state) {
case S_OPENFLOW:
- connmgr_run(p->connmgr, OFP10_VERSION, OFP10_VERSION, handle_openflow);
+ connmgr_run(p->connmgr, min_version, max_version, handle_openflow);
break;
case S_EVICT:
- connmgr_run(p->connmgr, OFP10_VERSION, OFP10_VERSION, NULL);
+ connmgr_run(p->connmgr, min_version, max_version, NULL);
ofproto_evict(p);
if (list_is_empty(&p->pending) && hmap_is_empty(&p->deletions)) {
p->state = S_OPENFLOW;
@@ -1119,7 +1120,7 @@ ofproto_run(struct ofproto *p)
break;
case S_FLUSH:
- connmgr_run(p->connmgr, OFP10_VERSION, OFP10_VERSION, NULL);
+ connmgr_run(p->connmgr, min_version, max_version, NULL);
ofproto_flush__(p);
if (list_is_empty(&p->pending) && hmap_is_empty(&p->deletions)) {
connmgr_flushed(p->connmgr);
diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h
index 32a00f2..1cdde3c 100644
--- a/ofproto/ofproto.h
+++ b/ofproto/ofproto.h
@@ -149,7 +149,8 @@ int ofproto_create(const char *datapath, const char *datapath_type,
void ofproto_destroy(struct ofproto *);
int ofproto_delete(const char *name, const char *type);
-int ofproto_run(struct ofproto *);
+int ofproto_run(struct ofproto *p, enum ofp_version min_version,
+ enum ofp_version max_version);
int ofproto_run_fast(struct ofproto *);
void ofproto_wait(struct ofproto *);
bool ofproto_is_alive(const struct ofproto *);
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index d161c4c..14e4b34 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2073,7 +2073,7 @@ bridge_run(void)
/* Let each bridge do the work that it needs to do. */
HMAP_FOR_EACH (br, node, &all_bridges) {
- ofproto_run(br->ofproto);
+ ofproto_run(br->ofproto, OFP10_VERSION, OFP10_VERSION);
}
/* Re-configure SSL. We do this on every trip through the main loop,
--
1.7.10.4
More information about the dev
mailing list