[Ns-developers] Proposal of a new kind of Tag (OneByteTag)

Manuel Requena manuel.requena at cttc.es
Wed Feb 6 09:46:33 PST 2019


Hi all,

Motivation:
* In the lte module, we use the Tags to generate some stats at the lower
layers (PDCP, RLC, MAC, PHY,...)
* But there are some limitations to the current PacketTag and ByteTag (more
info about these limitations in issue 2308,
https://www.nsnam.org/bugzilla/show_bug.cgi?id=2308 ). The main ones are:
	- There can be only one PacketTag per Packet
	- Split and merge operations generate an explosion of memory
(metadata) for ByteTag

To solve these limitations and solve the issue of the stats, I would like to
propose a new kind of tag (OneByteTag). It could also be an evolution of the
PacketTag or the ByteTag. 

The basic idea would be that the new tag tags just one byte (and always the
same) of the packet. If we split one Packet or merge two Packets, the
resulting Packet(s) keep the original Tags at the same logical place but
with different offset.

Let me put some examples to clarify what happens to the new tag.

1) Split of one packet into two packets

MyOneByteTag myTagA (11);
MyOneByteTag myTagB (22);
Ptr<Packet> p1 = Create<Packet> (200); 
p1->AddOneByteTag (myTagA, 0);
p1->AddOneByteTag (myTagB, 100);
// Here p1 has two OneByteTag at offset = 0 (with value 11) and offset = 100
(with value 22), respectively.

p2 = p1->CreateFragment (0, 100);
// p2 has a myTagA (with value 11) at offset = 0 and p1 has myTagB (with
value 22) at offset = 0

2) Merging of two packets into one packet

MyOneByteTag myTagA (11);
MyOneByteTag myTagB (22);
Ptr<Packet> p1 = Create<Packet> (100); 
p1->AddOneByteTag (myTagA);
Ptr<Packet> p2 = Create<Packet> (100); 
p2->AddOneByteTag (myTagB);
// Here p1 has one OneByteTag at offset = 0 (with value 11) and
// p2 has one OneByteTag at offset = 0 (with value 22)

p1->AddAtEnd (p2);
// Now p1 has two OneByteTag, one with offset = 0 (with value 11) and the
other one with offset = 100 (with value 22)

Comments are welcome.

Best regards,
Manuel 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4640 bytes
Desc: not available
URL: <https://mailman.isi.edu/pipermail/ns-developers/attachments/20190206/5d7594eb/attachment.p7s>


More information about the Ns-developers mailing list