On 28 September 2017 at 10:38, Ben Pfaff <b...@ovn.org> wrote: > nicira-ext.h says: > > * 1. OVS sends an NXT_FLOW_MONITOR_PAUSED message to the controller, > following > * all the already queued notifications. After it receives this > message, > * the controller knows that its view of the flow table, as represented > by > * flow monitor notifications, is incomplete. > > The actual implementation could send NXT_FLOW_MONITOR_PAUSED in the middle > of a series of queued notifications. This fixes it to always send it after > those notifications. Possibly this confused some controllers, since the > documentation said that NXFME_ADD and NXFME_MODIFIED notifications wouldn't > be sent between "pause" and "resume" messages, but this bug could cause > them to be sent just after "pause". > > Signed-off-by: Ben Pfaff <b...@ovn.org> >
Acked-by: Gurucharan Shetty <g...@ovn.org> > VMware-BZ: #1919454 > --- > ofproto/connmgr.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c > index c0ce828ce00a..30c627f43d9f 100644 > --- a/ofproto/connmgr.c > +++ b/ofproto/connmgr.c > @@ -2237,22 +2237,22 @@ ofmonitor_flush(struct connmgr *mgr) > struct ofconn *ofconn; > > LIST_FOR_EACH (ofconn, node, &mgr->all_conns) { > - struct ofpbuf *msg; > + struct rconn_packet_counter *counter = ofconn->monitor_counter; > > + struct ofpbuf *msg; > LIST_FOR_EACH_POP (msg, list_node, &ofconn->updates) { > - unsigned int n_bytes; > - > - ofconn_send(ofconn, msg, ofconn->monitor_counter); > - n_bytes = rconn_packet_counter_n_bytes( > ofconn->monitor_counter); > - if (!ofconn->monitor_paused && n_bytes > 128 * 1024) { > - struct ofpbuf *pause; > - > - COVERAGE_INC(ofmonitor_pause); > - ofconn->monitor_paused = monitor_seqno++; > - pause = ofpraw_alloc_xid(OFPRAW_NXT_FLOW_MONITOR_PAUSED, > - OFP10_VERSION, htonl(0), 0); > - ofconn_send(ofconn, pause, ofconn->monitor_counter); > - } > + ofconn_send(ofconn, msg, counter); > + } > + > + if (!ofconn->monitor_paused > + && rconn_packet_counter_n_bytes(counter) > 128 * 1024) { > + struct ofpbuf *pause; > + > + COVERAGE_INC(ofmonitor_pause); > + ofconn->monitor_paused = monitor_seqno++; > + pause = ofpraw_alloc_xid(OFPRAW_NXT_FLOW_MONITOR_PAUSED, > + OFP10_VERSION, htonl(0), 0); > + ofconn_send(ofconn, pause, counter); > } > } > } > -- > 2.10.2 > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev