joshp...@gmail.com
unread,Dec 15, 2009, 12:10:24 PM12/15/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to faker.m...@gmail.com, cra...@gmail.com, tomh...@gmail.com, mathieu...@gmail.com, ri...@ece.gatech.edu, ns-3-r...@googlegroups.com, re...@codereview.appspotmail.com
We've changed uid in packet-metadata to a uint64_t. The rank is now
stored in the upper 32-bits of this uid. Since we changed the uid in
packet-metadata to 64-bit, we also changed the packetUid in the
ExtraItem structure in packet-metadata to 64-bit. Not 100% sure if this
was needed.
On 2009/12/14 13:44:33, Mathieu Lacage wrote:
> un-needed
Done.
On 2009/12/14 13:44:33, Mathieu Lacage wrote:
> I am not sure I understand who calls this function but I suspect that
to
> maintain a per-packet rank id, you need the class who creates a packet
to do
> something special.
> You could get away with this requirement and make it transparent to
you and
> everyone else if you made the uid allocation code in packet.cc call
> Simulator::GetSystemId () and mix it with its 32bit uid to produce a
64bit uid
> which is stored in PacketMetadata.
I like this idea, but I don't think it will work for what has to be
done. This new constructor is called after a packet has been sent to
another rank and immediately before packet deserialization. So if
Simulator::GetSystemId () were called, the wrong rank would be returned,
since we want the rank of the originating simulator. This information
is only contained in the serialized buffer, which is where we grab it
from (along with the original uid) and pass it to this new constructor.
On 2009/12/14 13:44:33, Mathieu Lacage wrote:
> If you really need a rank identifier for each packet, I think that it
would make
> sense to follow tom's suggestion, that is:
> - make GetUid return a uint64_t
> - make GetUid return the rank in the top 32 bits of the uid
I've removed this method and removed rank from packet-metadata. It is
now stored in the upper 32-bits as suggested.
On 2009/12/14 13:44:33, Mathieu Lacage wrote:
> Call ScheduleWithContext here to avoid the NS_ASSERT in the node.cc
code.
Thank you. Fixed.
On 2009/12/14 13:44:33, Mathieu Lacage wrote:
> If you do this, this method should also be exported from simulator.h
Done.
http://codereview.appspot.com/109068