X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=ofproto%2Fofproto-dpif-upcall.c;h=06a7a285d762df2083d4e6c39d3bd39efce5ae95;hb=0fc1f5c04c8c1a9ac461da8c6ab88dee680a5ab3;hp=3f5b5e805e8caea30a337a9537620e856c241389;hpb=3f11b876befc0629ca2a174546fa3f6b43d44e81;p=cascardo%2Fovs.git diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 3f5b5e805..06a7a285d 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -304,12 +304,10 @@ static upcall_callback upcall_cb; static atomic_bool enable_megaflows = ATOMIC_VAR_INIT(true); static atomic_bool enable_ufid = ATOMIC_VAR_INIT(true); -struct udpif * -udpif_create(struct dpif_backer *backer, struct dpif *dpif) +void +udpif_init(void) { static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER; - struct udpif *udpif = xzalloc(sizeof *udpif); - if (ovsthread_once_start(&once)) { unixctl_command_register("upcall/show", "", 0, 0, upcall_unixctl_show, NULL); @@ -329,6 +327,12 @@ udpif_create(struct dpif_backer *backer, struct dpif *dpif) upcall_unixctl_purge, NULL); ovsthread_once_done(&once); } +} + +struct udpif * +udpif_create(struct dpif_backer *backer, struct dpif *dpif) +{ + struct udpif *udpif = xzalloc(sizeof *udpif); udpif->dpif = dpif; udpif->backer = backer;