ofproto-dpif-upcall: Make handler always call poll_block.
authorAlex Wang <alexw@nicira.com>
Mon, 29 Dec 2014 23:56:23 +0000 (15:56 -0800)
committerAlex Wang <alexw@nicira.com>
Tue, 6 Jan 2015 18:49:18 +0000 (10:49 -0800)
commit78d9bbb45efc7227b2efd4a94394ee574742c1ca
tree0f7351e47826075faae59f57a86d33fcf5b50460
parent8091d037e54fe58ddfdd67cdfd7d93f4689f02dc
ofproto-dpif-upcall: Make handler always call poll_block.

This commit makes handler threads always call poll_block() at
the end of each handling cycle.  If there are upcalls received
in the current cycle, the handler will register to wake up
immediately.  Otherwise, it will wait on both the netlink
socket and the exit latch.

Calling poll_block() at every handling cycle makes sure that
coverage counter stats are always timely attributed, and that
the execution of ovsrcu-postponed events is not held by any
busy handler thread.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-upcall.c