+ int error = 0;
+
+ if (dpif->dpif_class->handlers_set) {
+ error = dpif->dpif_class->handlers_set(dpif, n_handlers);
+ log_operation(dpif, "handlers_set", error);
+ }
+ return error;
+}
+
+void
+dpif_register_dp_purge_cb(struct dpif *dpif, dp_purge_callback *cb, void *aux)
+{
+ if (dpif->dpif_class->register_dp_purge_cb) {
+ dpif->dpif_class->register_dp_purge_cb(dpif, cb, aux);
+ }
+}
+
+void
+dpif_register_upcall_cb(struct dpif *dpif, upcall_callback *cb, void *aux)
+{
+ if (dpif->dpif_class->register_upcall_cb) {
+ dpif->dpif_class->register_upcall_cb(dpif, cb, aux);
+ }
+}
+
+void
+dpif_enable_upcall(struct dpif *dpif)
+{
+ if (dpif->dpif_class->enable_upcall) {
+ dpif->dpif_class->enable_upcall(dpif);
+ }
+}
+
+void
+dpif_disable_upcall(struct dpif *dpif)
+{
+ if (dpif->dpif_class->disable_upcall) {
+ dpif->dpif_class->disable_upcall(dpif);
+ }
+}
+
+void
+dpif_print_packet(struct dpif *dpif, struct dpif_upcall *upcall)
+{
+ if (!VLOG_DROP_DBG(&dpmsg_rl)) {
+ struct ds flow;
+ char *packet;
+
+ packet = ofp_packet_to_string(dp_packet_data(&upcall->packet),
+ dp_packet_size(&upcall->packet));
+
+ ds_init(&flow);
+ odp_flow_key_format(upcall->key, upcall->key_len, &flow);
+
+ VLOG_DBG("%s: %s upcall:\n%s\n%s",
+ dpif_name(dpif), dpif_upcall_type_to_string(upcall->type),
+ ds_cstr(&flow), packet);
+
+ ds_destroy(&flow);
+ free(packet);
+ }
+}
+
+/* If 'dpif' creates its own I/O polling threads, refreshes poll threads
+ * configuration. */
+int
+dpif_poll_threads_set(struct dpif *dpif, const char *cmask)
+{
+ int error = 0;
+
+ if (dpif->dpif_class->poll_threads_set) {
+ error = dpif->dpif_class->poll_threads_set(dpif, cmask);
+ if (error) {
+ log_operation(dpif, "poll_threads_set", error);
+ }
+ }
+