Bug 905

Summary: WimaxNetDevice loses packet uid, tags, and memory optimization
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: wimaxAssignee: Mohamed Amine ISMAIL <amine.ismail>
Status: RESOLVED FIXED    
Severity: major CC: amine.ismail, ns-bugs, tomh
Priority: P3    
Version: ns-3-dev   
Hardware: All   
OS: All   

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