From: Ingo Korb <ml@akana.de>
To: kvm@vger.kernel.org
Subject: Minimum Ethernet packet size problems in qemu-kvm
Date: Fri, 18 Sep 2009 13:56:23 +0100 [thread overview]
Message-ID: <u1vm4pg20.fsf@dragon.akana.de> (raw)
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
reply other threads:[~2009-09-18 12:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u1vm4pg20.fsf@dragon.akana.de \
--to=ml@akana.de \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.