Hello Andreas,
thank you very much for your patch. I've tested the patchset in my KVM setup. The fragmentation seems to work fine over one or multiple hops if i use the same MTUs on all hosts, but some corner cases might not bet handled yet.
For example:
Host 1 has one interface with MTU 1500 to host 2. Host 2 has two interfaces, one with MTU 1500 (to host 1) and one interface with MTU 1470 (to host 3), which might be a VPN connection. Host 3 has one interface with MTU 1470 to host 2.
Now i can send packets with size 1470 or 1440 from host 1 to host 3 without problems, but packets with size 1450 fail. The reason for this might be that host 1 sends the packet as is without fragmentation, but host 2 can not forward it because the MTU (1470) is too low, but does not fragment it. The packets therefore get dropped. (note: when i say packets of size xxxx i do: ping -M do -s xxxx)
I've also tried to do a similar setup with MTUs 1530 and 1500 instead of 1500 and 1470, which should simulate a wifi network connected to a fast ethernet network, but unfortunately my KVM crashed with high MTUs, so i could not verify this setup yet.
However, i think that scenarios like these, a high MTU medium connected to a low MTU medium are quite common. Linus has interconnected WiFi networks with VPN, and i've also used some WiFi network interconnected with fast Ethernet. If forwarding hosts could fragment packets on their own, this problem could be solved, right? What do you (or others) think?
Just as a minor comment, the copyright year in your new files should just be 2010, not 2007 - 2010.
best regards, Simon
On Wed, Jun 30, 2010 at 08:58:46PM +0200, Andreas Langer wrote:
Hi,
things that changed since the last patch:
- with fragmentation enabled the mtu of batX is always ETH_DATA_LEN
- fragment if mtu of the outgoing interface is smaller the needed size
- add a new packet type for fragmentation
- new recv function for fragmented packets
- new route unicast packet function to share routing code
- increase compat number to 12
regards, andreas