right. I guess timer1 should be refreshed only if the switch is still connected, which means you'd need to keep track of connection status per switch. When the switch disconnects, is that detected, and is a relevant event raised? If so, maybe you could do something like
handle_dp_join(): connected[dpid]=True post(period, request_stats) handle_dp_leave(): connected[dpid]=False request_stats(): send_stats_request if connected[dpid]: post(request_stats_event, seconds) and so if one session has timed out the corresponding timer will not reset, and just send one last request which will either time out or be caught in the next session? On Fri, Oct 15, 2010 at 12:27 AM, Nicholas Bastin <nbas...@stanford.edu>wrote: > On Thu, Oct 14, 2010 at 23:58, kk yap <yap...@stanford.edu> wrote: > >> Guess no one wants to read the lengthy email. Here's the question >> with an re-enactment: >> 1. Switch connected to NOX >> 2. NOX send stat request >> 3. Switch disconnect from NOX >> 4. Switch reconnects to NOX >> Now, should or can the switch send the stat reply for step 2? >> >> I believe this what the FlowVisor is presenting to NOX. I might be >> wrong, but that's how I have read this thread. >> > > I don't read it that way. I read it this way: > > 1. Switch connects to NOX > 2. NOX starts timer1 that will periodically send stat requests (the > callback resets the timer) > 3. Switch disconnects from NOX > 4. Switch reconnects to NOX *before* timer1 fires (and would error) > 5. NOX starts timer2 that will periodically send stat requests (because a > "new" switch attached) > 6. timer1 fires and then sets itself again > 7. timer2 fires and then sets itself again > > Rinse, lather, repeat. > > Once you flap the switch a few times, instead of sending a stat request > every 10 seconds, you're sending a lot every second because you now have a > bunch of timers per switch. Ultimately this is a logic problem in the app, > but it's exacerbated by NOX not giving a handle to the timer, so you can't > cancel it or even know you still have it going on unless you keep track of > that yourself. > > -- > Nick > > _______________________________________________ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > >
_______________________________________________ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org