diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2016-07-29 16:52:02 -0700 |
---|---|---|
committer | Jarno Rajahalme <jarno@ovn.org> | 2016-07-29 16:52:02 -0700 |
commit | b0d38b2f177a4072f387f21dcb6a57584b37539a (patch) | |
tree | f348987a2dd42c19a6a3e7ef58ba6b4947a4c38f /ofproto | |
parent | 0a0d938545b99d0f71cf53f4c37b0ba5e4500627 (diff) | |
download | openvswitch-b0d38b2f177a4072f387f21dcb6a57584b37539a.tar.gz |
ofproto: Report flow mods also from bundles.
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@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/ofproto.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 004868f66..369a1139a 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -5378,7 +5378,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); @@ -5390,15 +5390,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; } @@ -6974,6 +6967,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): |