[ovs-dev] [PATCH v2 08/15] connmgr: Make connmgr_wants_packet_in_on_miss() lock-free.

Ben Pfaff blp at ovn.org
Mon Aug 29 21:49:41 UTC 2016


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 <jarno at 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);



More information about the dev mailing list