Flow mod stats get skewed if they are not reported from bundles. Move
reporting to ofproto_flow_mod_finish() so that it will be done in all
cases.
Signed-off-by: Jarno Rajahalme
---
ofproto/ofproto.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index a5d681a..0e8200b 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -5489,7 +5489,7 @@ handle_flow_mod(struct ofconn *ofconn, const struct
ofp_header *oh)
error = reject_slave_controller(ofconn);
if (error) {
-goto exit;
+return error;
}
ofpbuf_use_stub(, ofpacts_stub, sizeof ofpacts_stub);
@@ -5501,15 +5501,8 @@ handle_flow_mod(struct ofconn *ofconn, const struct
ofp_header *oh)
struct openflow_mod_requester req = { ofconn, oh };
error = handle_flow_mod__(ofproto, , );
}
-if (error) {
-goto exit_free_ofpacts;
-}
-ofconn_report_flow_mod(ofconn, ofm.fm.command);
-
-exit_free_ofpacts:
ofpbuf_uninit();
-exit:
return error;
}
@@ -7077,6 +7070,10 @@ ofproto_flow_mod_finish(struct ofproto *ofproto,
default:
break;
}
+
+if (req) {
+ofconn_report_flow_mod(req->ofconn, ofm->fm.command);
+}
}
/* Commit phases (all while locking ofproto_mutex):
--
2.1.4
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev