[ndnSIM] MTU, Payload Size and an Assert Message
Christian Kreuzberger
christian.kreuzberger at itec.aau.at
Tue Feb 24 08:04:45 PST 2015
Hi Alex,
though the problem is, unless you run ndnSIM in debug mode (which
usually nobody does), you wouldn't notice the problem with those dummy
consumers/producers. Would it make sense to catch this "exception" in
Producer::StartApplication() (or even Producer::OnInterest() ) by
checking whether m_virtualPayloadSize (or the actual packet size) is
smaller than m_netDevice->GetMtu() (though I guess that checking the
actual packet size for every interest would be possible, but could
potentially slow down the simulations by a lot).
I am able to provide a patch introducing a "sanity check" in
Producer::StartApplication() as I have something similar for one of my
custom consumers, if you'd like.
Example:
uint16_t
Producer::GetFaceMTU(uint32_t faceId)
{
Ptr<ns3::PointToPointNetDevice> nd1 =
GetNode
()->GetDevice(faceId)->GetObject<ns3::PointToPointNetDevice>();
return nd1->GetMtu();
}
Best regards,
Christian
On 2015-02-24 16:25, Alex Afanasyev wrote:
> Hi Christian,
>
> This is intended behavior. If you need to use larger MTU sizes, you
> simply need to explicitly set MTU parameter on point to point link.
> Without such an explicit setting, ns3 in debug mode is "reminding" you
> that simulation parameters do not match.
>
> ---
> Alex
>
> On Feb 24, 2015, at 4:51 AM, Christian Kreuzberger
> <christian.kreuzberger at itec.aau.at> wrote:
>
>> In line 80 of ndn-net-device-face.cpp, there is an ASSERT MESSAGE
>> checking whether packet->Getsize() <= m_netDevice->GetMtu().
>>
>>
> https://github.com/named-data/ndnSIM/blob/master/model/ndn-net-device-face.cpp#L80
>> [1]
>>
>> The line does make sense, as fragmentation is not (yet) implemented
>> (or is it?). However, this ASSERT Message is only triggered if
>> ndnSIM is compiled in debug mode (e.g., not with –d optimized),
>> hence if you run ndnSIM in debug mode, the simulation will stop if
>> the payload+header+tags is to large. Though if you run it without
>> debug mode, the simulation will continue even with payloads that go
>> beyond the MTU.
>>
>> I’m wondering if this behaviour is intended, and I am also
>> wondering what happens to too large payloads – I guess it could
>> cause problems and produce inaccurate results in certain cases.
>>
>> Hope to help,
>>
>> Christian
>
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim [2]
>
>
> Links:
> ------
> [1]
> https://github.com/named-data/ndnSIM/blob/master/model/ndn-net-device-face.cpp#L80
> [2] http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
More information about the ndnSIM
mailing list