ns-3.13 click scheduling bug

23 views
Skip to first unread message

Sascha Alexander Jopen

unread,
Dec 28, 2011, 6:02:34 AM12/28/11
to ns-3-...@googlegroups.com
Hey,

with the new release of ns3 i got errors with click scheduling events
after current simulation time. This is because clicks scheduling with
ns3 is always done with microsecond precision, but in the simulator
itself has nanosecond precision per ?default?. I fixed this by rounding
the current simulation time reported to click up to the next
microsecond, but since click supports nanosecond resolution internally,
it may be better to make ns3 <-> click communication that precise too.

Please see the attached patch for a quick fix.

Regards,
Sascha


ns3-click-schedule-timeval.patch

Sascha Alexander Jopen

unread,
Dec 28, 2011, 2:20:43 PM12/28/11
to ns-3-...@googlegroups.com
Whops, please use this patch, the other one used an uninitialized value.
ns3-click-schedule-timeval.patch

Lalith Suresh

unread,
Dec 30, 2011, 11:09:23 AM12/30/11
to ns-3-...@googlegroups.com
Hi Sascha,


Thanks for the patch. I'll give it a spin and get back to you on this.
 
> Regards,
> Sascha
>
>

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.




--
Lalith Suresh

Lalith Suresh

unread,
Dec 30, 2011, 1:02:16 PM12/30/11
to ns-3-...@googlegroups.com
Hi Sascha,

On Fri, Dec 30, 2011 at 5:09 PM, Lalith Suresh <suresh...@gmail.com> wrote:
Hi Sascha,


On Wed, Dec 28, 2011 at 8:20 PM, Sascha Alexander Jopen <jo...@informatik.uni-bonn.de> wrote:
Whops, please use this patch, the other one used an uninitialized value.

On 12/28/11 12:02, Sascha Alexander Jopen wrote:
> Hey,
>
> with the new release of ns3 i got errors with click scheduling events
> after current simulation time. This is because clicks scheduling with
> ns3 is always done with microsecond precision, but in the simulator
> itself has nanosecond precision per ?default?. I fixed this by rounding
> the current simulation time reported to click up to the next
> microsecond, but since click supports nanosecond resolution internally,
> it may be better to make ns3 <-> click communication that precise too.
>
> Please see the attached patch for a quick fix.
>

Thanks for the patch. I'll give it a spin and get back to you on this.


The patch looks good. I've made some minor changes (regarding coding style, method naming, and using an uint64_t for the remainder) and pushed in changeset 7668:e87369a823eb. Thanks!

Any idea on how we can get this down to nanosecond level precision? From a quick glance of the Click code, it seems like we'll need to replace the use of timeval struct in the simulator API (simclick_node.curtime in simclick.h) with a Click Timestamp type. timestamp.hh suggests that Click always runs in nanosecond precision in user-level, so this shouldn't be too tricky. What do you think?


--
Lalith Suresh

Chang Liu

unread,
Dec 30, 2011, 9:24:08 PM12/30/11
to ns-3-...@googlegroups.com
mainly wasted a day

Reply all
Reply to author
Forward
0 new messages