ofproto-dpif-upcall: Fix ovs-vswitchd crash.
On current master, caller of udpif_set_threads() can pass 0 value
on n_handlers and n_revalidators to delete all handler and revalidator
threads.
After commit
9a159f748866 (ofproto-dpif-upcall: Remove the dispatcher
thread.), udpif_set_threads() also calls the dpif_handlers_set() with
the 0 value 'n_handlers'. Since dpif level always assume the 'n_handlers'
be non-zero, this causes warnings and even crash of ovs-vswitchd.
This commit fixes the above issue by defining separate functions for
starting and stopping handler and revalidator threads. So
udpif_set_threads() will never be called with 0 value arguments.
Reported-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Co-authored-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>