X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto-dpif-upcall.c;h=839cbff79dba25243515cc8d309c2ee4f355830b;hb=0f2ea84841e1689ebf18e2260819e6493dbf2356;hp=cc4982fe8a560eed69d9f7c02d8b87250b66f7e6;hpb=06f64d032ab82237b4ff7d92f6d6328869d70931;p=sliver-openvswitch.git diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index cc4982fe8..839cbff79 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -32,6 +32,7 @@ #include "ofproto-dpif-ipfix.h" #include "ofproto-dpif-sflow.h" #include "ofproto-dpif-xlate.h" +#include "ovs-rcu.h" #include "packets.h" #include "poll-loop.h" #include "seq.h" @@ -297,6 +298,8 @@ void udpif_set_threads(struct udpif *udpif, size_t n_handlers, size_t n_revalidators) { + ovsrcu_quiesce_start(); + /* Stop the old threads (if any). */ if (udpif->handlers && (udpif->n_handlers != n_handlers @@ -405,6 +408,8 @@ udpif_set_threads(struct udpif *udpif, size_t n_handlers, xpthread_create(&udpif->dispatcher, NULL, udpif_dispatcher, udpif); xpthread_create(&udpif->flow_dumper, NULL, udpif_flow_dumper, udpif); } + + ovsrcu_quiesce_end(); } /* Waits for all ongoing upcall translations to complete. This ensures that