Bug 490 - OnOffApplication: m_lastStartTime not set correctly
: OnOffApplication: m_lastStartTime not set correctly
Status: RESOLVED FIXED
: ns-3
applications
: ns-3-dev
: All All
: P1 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-02-05 12:28 EDT by
Modified: 2009-03-12 16:19 EDT (History)


Attachments
suggested patch (2.02 KB, patch)
2009-02-05 12:29 EDT, Tom Henderson
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-02-05 12:28:56 EDT
m_lastStartTime needs to be set both when a packet is sent and when the
application starts sending.  Otherwise, it is possible for an application to
start and stop without a packet being sent, and the computation for
m_residualBits becomes incorrect.  An artifact of the current bug is that
csma-multicast.cc script doesn't send any packets.

Also, the behavior of OnOffApplication needs to be better documented because it
wasn't intuitive to me that state is saved across stop/start event sequences.
------- Comment #1 From 2009-02-05 12:29:34 EDT -------
Created an attachment (id=373) [details]
suggested patch
------- Comment #2 From 2009-02-25 15:46:07 EDT -------
Makes perfect sense; if its tested, please commit.
------- Comment #3 From 2009-03-02 15:13:37 EDT -------
The patch breaks the regression in two tests:
FAIL: 2 of 22 tests have failed (test-csma-multicast, test-csma-raw-ip-socket)

Tom, can you comment on whether or not you'd expect the regression traces to
change in these two cases?  It seems that most of our tests use the OnOff
application, but only two of them change their output.
------- Comment #4 From 2009-03-02 15:16:48 EDT -------
Whoops, didn't mean to close the bug.
------- Comment #5 From 2009-03-02 15:37:48 EDT -------
Somewhere along the line the csma-multicast regression test was actually
disabled because an app change caused it to cease emitting packets.  Tom and I
had a laugh when he disabled multicast in his ipv4 rework and the multicast
tests continued to pass.

All of the traces for csma-raw-ip-socket are also empty now as well, probably
due to the same thing.

If your change causes these tests to begin emitting packets, that is "A Good
Thing" (TM).
------- Comment #6 From 2009-03-03 03:57:54 EDT -------

(In reply to comment #3)
> The patch breaks the regression in two tests:
> FAIL: 2 of 22 tests have failed (test-csma-multicast, test-csma-raw-ip-socket)
> 
> Tom, can you comment on whether or not you'd expect the regression traces to
> change in these two cases?  It seems that most of our tests use the OnOff
> application, but only two of them change their output.
> 

Yes, my initial comment said that csma-multicast was broken by this bug. 
test-csma-raw-ip-socket also has no packets because of this bug.  It seemed to
me that this patch causes packets to flow correctly in those cases.

Can you please commit it?  
------- Comment #7 From 2009-03-12 16:19:15 EDT -------
4262:170eff4aba90 in ns-3-dev

72:b58c70b348d4 is ns-3-dev-ref-traces