[ovs-dev] [PATCH v2 08/26] ofproto: Report flow mods also from bundles.
Jarno Rajahalme
jarno at ovn.org
Fri Jul 29 00:56:00 UTC 2016
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 <jarno at ovn.org>
---
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, 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, &ofm, &req);
}
- if (error) {
- goto exit_free_ofpacts;
- }
- ofconn_report_flow_mod(ofconn, ofm.fm.command);
-
-exit_free_ofpacts:
ofpbuf_uninit(&ofpacts);
-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
More information about the dev
mailing list