Bug 905 - WimaxNetDevice loses packet uid, tags, and memory optimization
WimaxNetDevice loses packet uid, tags, and memory optimization
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wimax
ns-3-dev
All All
: P3 major
Assigned To: Mohamed Amine ISMAIL
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-03 06:28 EDT by Gustavo J. A. M. Carneiro
Modified: 2010-07-06 03:25 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo J. A. M. Carneiro 2010-05-03 06:28:25 EDT
At first glance, it appears to me that the Wimax device simulates by serializing a packet to a bit stream:

      packet->CopyData (pstart, packet->GetSize ());

and back to a Packet at the other end:

      Ptr<Packet> p = Create<Packet> (&(pstart[pos]), packetSize);

This explains why PyViz does not work with Wimax devices.  When a packet traverses the wimax link, the packet UID is not preserved.  Additionally, I tried to add packet tags, and then byte tags, to no avail.

Additionally, this serialization is bad for memory.  Every time a packet traverses a wimax link it loses the "dummy bytes" memory optimization, forever.
Comment 1 Gustavo J. A. M. Carneiro 2010-05-17 06:54:45 EDT
In fact, I am seeing this comment:

/*
 Converts back the bit buffer (bvec) to the actual burst.
 Actually creates byte buffer from the bvec and resets the buffer
 of each packet in the copy of the orifinal burst stored before transmitting.
 By doing this it preserves the metadata and tags in the packet.
 Function could also be named DeserializeBurst because actually it
 copying to the burst's byte buffer.
 */
Ptr<PacketBurst>
SimpleOfdmWimaxPhy::ConvertBitsToBurst (bvec buffer)


However, the comment is not in conformity with the actual code:

[...]
      Ptr<Packet> p = Create<Packet> (&(pstart[pos]), packetSize);
      RecvBurst->AddPacket (p);

This creates a brand new packet, without any metadata or tags...
Comment 2 Mohamed Amine ISMAIL 2010-07-06 03:25:12 EDT
Fixed in changeset 6402	088c5e38acb3