X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fin-band.c;h=44bcd720a99bbe905361c0323bcde7ed280d4e23;hb=90a249dc93ccabd398b64092121b07e5af2d8c2d;hp=bf90273e132e4243ada5f0fbef1ff3fd2f8590a1;hpb=d2ede7bc13478e45c58d31a3fe569785b0622682;p=openvswitch diff --git a/ofproto/in-band.c b/ofproto/in-band.c index bf90273e..44bcd720 100644 --- a/ofproto/in-band.c +++ b/ofproto/in-band.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -34,10 +35,10 @@ #include "poll-loop.h" #include "status.h" #include "timeval.h" - -#define THIS_MODULE VLM_in_band #include "vlog.h" +VLOG_DEFINE_THIS_MODULE(in_band) + /* In-band control allows a single network to be used for OpenFlow * traffic and other data traffic. Refer to ovs-vswitchd.conf(5) and * secchan(8) for a description of configuring in-band control. @@ -745,14 +746,9 @@ in_band_run(struct in_band *ib) void in_band_wait(struct in_band *in_band) { - time_t now = time_now(); - time_t wakeup + long long int wakeup = MIN(in_band->next_remote_refresh, in_band->next_local_refresh); - if (wakeup > now) { - poll_timer_wait((wakeup - now) * 1000); - } else { - poll_immediate_wake(); - } + poll_timer_wait_until(wakeup * 1000); } /* ofproto has flushed all flows from the flow table and it is calling us back