+/* Tells 'udpif' how many threads it should use to handle upcalls.
+ * 'n_handlers' and 'n_revalidators' can never be zero. 'udpif''s
+ * datapath handle must have packet reception enabled before starting
+ * threads. */
+void
+udpif_set_threads(struct udpif *udpif, size_t n_handlers,
+ size_t n_revalidators)
+{
+ int error;
+
+ ovs_assert(n_handlers && n_revalidators);
+
+ ovsrcu_quiesce_start();
+ udpif_stop_threads(udpif);
+
+ error = dpif_handlers_set(udpif->dpif, n_handlers);
+ if (error) {
+ VLOG_ERR("failed to configure handlers in dpif %s: %s",
+ dpif_name(udpif->dpif), ovs_strerror(error));
+ return;
+ }
+
+ udpif_start_threads(udpif, n_handlers, n_revalidators);