[Ns-bugs] [Bug 822] NetDevice::Mtu attribute not settable by default
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Tue Apr 6 11:57:48 PDT 2010
http://www.nsnam.org/bugzilla/show_bug.cgi?id=822
--- Comment #5 from Tom Henderson <tomh at tomh.org> 2010-04-06 14:57:47 EDT ---
I'd like to try to resolve this for the current release.
To summarize, NetDevice::Mtu presently has two problems. 1) it leads to
order-of-initialization problems since it is linked to subclass attributes like
Csma FrameSize. 2) the default value doesn't get stored properly in the config
store system (bug 845).
Here are the options I see:
1) simply remove this attribute, since each subclass has its own way of
configuring frame size via attributes
pro: simple (attribute was broken anyway)
con: we lose this commonality among devices, especially user familiarity
with the concept (ifconfig mtu ...). If I do an "ifconfig mtu N" from a
container bound to an ns-3 NetDevice, I will need to downcast the pointer and
search for the right attribute (unless we preserve base class SetMtu/GetMtu
methods).
2) move this attribute to each subclass, but remove the device-specific frame
size attributes so that we don't have two attributes pointing to one member
variable (again leading to initialization order problems and user confusion)
pro: MTU can be device specific (more realistic)
con: breaks ns-3 API
3) move Mtu attribute to each subclass, and decouple this attribute from the
frame size attribute; these are two separate member variables. This means that
a user could e.g. set an Ethernet MTU of 1000 bytes even though the frame size
was set to 1518 bytes. Consistency checking would still be needed (that MTU <=
(frame size - header size), for instance).
pro: preserves a device-specific MTU and preserves ns-3 API
con: still needs to be robust to initialization order issues; need to
document to users that these concepts (FrameSize and Mtu) are still related in
some way, but are not locked in-step to each other
Preferences, comments?
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Ns-bugs
mailing list