[Ns-developers] network path packet tag
mathieu.lacage at gmail.com
Wed Sep 14 06:19:43 PDT 2011
On Tue, Sep 6, 2011 at 14:10, Oliveri, Payton M USA CTR (US)
<payton.m.oliveri.ctr at mail.mil> wrote:
> We were looking to implement a way to track packets through the network from source to destination to observe the route taken. We initially set this up through a series of callbacks connected to the IP layer, identifying the original send, each forward, and the final receive; however, this very quickly degrades efficiency (it takes approx 30 times as long to run with this added load).
> Our next thought was to simply develop our own packet tag, that could be removed at each new hop, that hop's id appended, and the tag re-added to the packet. However this starts to compete with PACKET_TAG_MAX_SIZE defined in packet-tag-list.h. We realize that simply increasing this value for the expected diameter of the network is very poor in terms of memory management, especially since it affects each packet tag's memory allocation.
> Is there a recommended way of gathering this information? Is there a way to modify how we use our new packet tag to avoid this issue, possibly with variable length packet tags?
Given the fact that the current implementation of packet and byte tags
were done early during the development of ns-3 with relatively little
practical workloads to test them against, it is quite likely that now
that we have a reasonably-sized community of users, models and example
scenarios, we can come up with something better in the sense that it
is more efficient cpu and/or memory-wise for our target scenarios.
Before we get there, though, I would start with collecting some
usage/trace data about tags. Namely, something that would tell us:
- what tag is added to what TagList, when it is looked at, and removed.
- when is the TagList copied for true, when it is copied with cow semantics.
Basically, it would be really helpful to have someone contribute a
patch which adds compile-time-configured instrumentation to the
PacketTagList and have a number of users contribute these traces.
Mathieu Lacage <mathieu.lacage at gmail.com>
More information about the Ns-developers