Minimum Ethernet packet size problems in qemu-kvm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I noticed a curious little problem with my virtualized DSL router which
seems to indicate that qemu-kvm (kvm-88-1081-g561d3ed) will deliver
packets to the guest over the emulated network card (tested with rtl8139
and ne2k_pci) which wouldn't appear on real hardware because they are
shorter than the minimum packet size on Ethernet (64 bytes including
CRC32).

My current workaround is to enforce a minimum size of 64 in
net.c/tap_send, but I believe this is not the correct solution - the
guest now sees every packet as really 64 bytes long even when it
shouldn't be.

In case anyone cares how this problems manifests on my setup:
PPPoE packets have a payload length field that in the case of my ISP
always indicates an overall packet size of at least 64 bytes even if the
incoming packet is smaller than that. The pppoe code of Linux added
checks that drop all packets where the PPPoE-header-indicated length is
larger than the packet length in commit 392fdb0e. On real hardware this
check would never fail even with my broken ISP because Ethernet cannot
transmit packets small enough to fail this check, with qemu-kvm those
packets are now dropped.

Short system summary, although I suspect it doesn't matter with this
problem:
- AMD Phenom II 905e
- kvm-88-1081-g561d3ed
- host kernel 2.6.26-2-amd64 (Debian lenny packaged, amd64 arch)
- 32 bit Linux userspace
- kvm parameters: -m 128 -k de -nographic -serial mon:stdio -echr 0x14
                  -hda router.img -net nic,vlan=0 -net nic,vlan=1
                  -net tap,vlan=0,script=ifup.sh,downscript=ifdown.sh
                  -net tap,vlan=1,script=ifup.sh,downscript=ifdown.sh
  (both virtual NICs bridged to their own ethernet card on the host)
- no changes with "-no-kvm"

-ik

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux