nyuwireless-unipd / ns3-mmwave

ns-3 module for simulating mmWave-based cellular systems. See https://ieeexplore.ieee.org/document/8344116/ (open access) as a reference.
GNU General Public License v2.0
303 stars 194 forks source link

Byte tags are lost when using a TCP connection #33

Open vikigenius opened 6 years ago

vikigenius commented 6 years ago

I have created a simple tcp source and sink example and calculating packet delay. The sender is a custom application that adds a byte tag with the time-stamp to the packet. The receiver is a simple sink application. I use the callback mechanism to trace the Rx packets and try to read the sender timestamp to calculate delay.

However i am unable to read the byte tags, and the byte tag list turns out empty on debugging: packet->FindFirstMatchingByteTag(tag) // This returns false

This code is working in a simple Lte example which gets the correct byte tag, but i cannot get it to work with the mmwave module.

mychele commented 6 years ago

Hi Vikash, try using PacketTags or traces to log packet TX and RX. We had some issues with ByteTags on X2 links, so we disabled them in the PDCP classes (you can also re-enable them by commenting these lines https://github.com/nyuwireless-unipd/ns3-mmwave/blob/662b9546527bd9108f5d79c8f602f772df6d2f96/src/lte/model/mc-ue-pdcp.cc#L255

https://github.com/nyuwireless-unipd/ns3-mmwave/blob/662b9546527bd9108f5d79c8f602f772df6d2f96/src/lte/model/mc-enb-pdcp.cc#L272 ). Best, Michele

2017-11-17 15:53 GMT+01:00 Vikash notifications@github.com:

I have created a simple tcp source and sink example and calculating packet delay. The sender is a custom application that adds a byte tag with the time-stamp to the packet. The receiver is a simple sink application. I use the callback mechanism to trace the Rx packets and try to read the sender timestamp to calculate delay.

However i am unable to read the byte tags, and the byte tag list turns out empty on debugging: packet->FindFirstMatchingByteTag(tag) // This returns false

This code is working in a simple Lte example which gets the correct byte tag, but i cannot get it to work with the mmwave module.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nyuwireless-unipd/ns3-mmwave/issues/33, or mute the thread https://github.com/notifications/unsubscribe-auth/AG1b5ZDJFaBevl9FOly8MTrNMoqrwDsVks5s3Z3egaJpZM4QiJXW .

-- Michele Polese

Ph.D. Student Dept. of Information Engineering (DEI) - SIGNET Research Group University of Padova Via Gradenigo 6/B, 35131 Padova (Italy)

email: michele@polese.io web: polese.io - mmwave.dei.unipd.it

biljkus commented 6 years ago

This might be related to this issue: https://www.nsnam.org/bugzilla/show_bug.cgi?id=2308

vikigenius commented 6 years ago

@mychele Thanks for the response and suggestion.

This was just a simple example i devised to isolate the issue. I do probably need the tags for other information. I don't think packet tags are a good idea, because TCP being a byte stream protocol, i think packet tags will be lost. I will try to comment out the lines removing byte tags. Can you elaborate on the issues with ByteTags on X2 links? I want to know if it will affect what i am doing in any way.

@biljkus This issue is not happening in the master branch, only in the new-handover branch. So i think it is related to the issue that @mychele described. But thanks for the link anyway, that seems like an interesting issue to keep in mind.

mychele commented 6 years ago

I actually tried to use PacketTags instead of ByteTags at the PDCP and RLC layers, but additional concatenation happens at the MAC layer in the mmWave model, thus it was not a good fit. Best, Michele