On Monday 09 November 2009 16:43:33 Donald Gordon wrote:
I have a feature request -- has there been any consideration to getting batman-adv to fragment ethernet frames, so as to get a 1500 byte MTU batman-adv network running on top of a 1500 byte MTU ethernet network? This would be a useful feature for people trying to reuse whatever random ethernet networks happen to be nearby to extend their mesh, while not requiring the mesh users to all configure a lower MTU. And the support you've announced for combining small ethernet frames into larger batman-adv frames means that the overhead might not be too bad.
You will need quite some code to implement a good fragmentation but even if you find the time to do so it comes with a severe performance penalty. Imagine a payload packet comes in (1500 bytes), batman-adv adds its stuff (24 bytes) and then we make 2 packets out of it: one 1500 Bytes and one 24 Bytes (probably a bit more for fragmentation handling). Now you have 2 packets instead of one! Wired networks tend to avoid it (which is why applications tried to determine the PMTU) - wireless networks should avoid it even more because if you loose one of the packets both need to be retransmitted.
You can handle this issue elegantly by increasing the MTU of the mesh interfaces. Most wifi cards / drivers already accept MTUs greater than 1500 bytes and most ethernet cards do as well.
Nevertheless, it might be neat to have fragmentation as a fallback mechanism. Be sure we review and submit your code as soon as it is available. :)
Regards, Marek