> On Aug 29, 2016, at 2:49 PM, Ben Pfaff <b...@ovn.org> wrote: > > On Mon, Aug 22, 2016 at 04:31:34PM -0700, Jarno Rajahalme wrote: >> Make connmgr_wants_packet_in_on_miss() use an atomic int instead of a >> list traversal taking the 'ofproto_mutex'. This allows >> connmgr_wants_packet_in_on_miss() to be called also when >> 'ofproto_mutex' is already held, and makes it faster, too. >> >> Remove unused ofproto_dpif_wants_packet_in_on_miss(). >> >> Signed-off-by: Jarno Rajahalme <ja...@ovn.org> > > The logic doesn't seem right to me. In ofconn_create() below, > ofconn_flush() always sets the protocol to OFPUTIL_P_NONE, so > update_want_packet_in_on_miss() will always treat the connection as one > that wants packet-ins. Later on, the true OpenFlow version of the > connection will be learned (unless it drops quickly), but the count > won't be updated, but the call to update_want_packet_in_on_miss() from > ofconn_destroy() will behave differently depending on the version. > > ofconn_flush(ofconn); > > update_want_packet_in_on_miss(ofconn, true);
Oops, I totally missed the dynamic nature of this the first time around. I think I nailed it for the v2, though, updating the status after each ofconn_set_protocol() and ofconn_set_controller_id() change. Jarno _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev