From: "Edgar E. Iglesias" <638955@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 638955] Re: [Qemu-devel] [PATCH] e1000: Pad short frames to minimum size (60 bytes)
Date: Mon, 20 Sep 2010 20:51:36 -0000 [thread overview]
Message-ID: <20100920205136.GB20298@laped.lan> (raw)
In-Reply-To: 4C97C4A4.1030801@codemonkey.ws
On Mon, Sep 20, 2010 at 03:31:32PM -0500, Anthony Liguori wrote:
> On 09/20/2010 05:42 AM, Michael S. Tsirkin wrote:
> > On Sun, Sep 19, 2010 at 07:36:51AM +0100, Stefan Hajnoczi wrote:
> >
> >> On Sat, Sep 18, 2010 at 10:27 PM, Edgar E. Iglesias
> >> <edgar.iglesias@gmail.com> wrote:
> >>
> >>> This doesn't look right. AFAIK, MAC's dont pad on receive.
> >>>
> >> I agree. NICs that do padding will do it on transmit, not receive.
> >> Anything coming in on the wire should already have the minimum length.
> >>
> > QEMU never gets access to the wire.
> > Our APIs do not really pass complete ethernet packets:
> > we forward packets without checksum and padding.
> >
> > I think it makes complete sense to keep this and
> > handle padding in devices because we
> > have devices that pass the frame to guest without padding and checksum.
> > It should be easy to replace padding code in devices that
> > need it with some kind of macro.
> >
>
> Would this not also address the problem? It sounds like the root cause
> is the tap code, not the devices..
>
> Regards,
>
> Anthony Liguori
>
> >
> >> In QEMU that isn't true today and that's why rtl8139, pcnet, and
> >> ne2000 already do this same padding. This patch is the smallest
> >> change to cover e1000.
> >>
> >>
> >>> IMO this kind of padding should somehow be done by the bridge that forwards
> >>> packets into the qemu vlan (e.g slirp or the generic tap bridge).
> >>>
> >> That should work and we can then drop the padding code from existing
> >> NICs. I'll take a look.
> >>
> >> Stefan
> >>
> >
>
> From f77c3143f3fbefdfa2f0cc873c2665b5aa78e8c9 Mon Sep 17 00:00:00 2001
> From: Anthony Liguori <aliguori@us.ibm.com>
> Date: Mon, 20 Sep 2010 15:29:31 -0500
> Subject: [PATCH] tap: make sure packets are at least 40 bytes long
>
> This is required by ethernet drivers but not enforced in the Linux tap code so
> we need to fix it up ourselves.
>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> diff --git a/net/tap.c b/net/tap.c
> index 4afb314..822241a 100644
> --- a/net/tap.c
> +++ b/net/tap.c
> @@ -179,7 +179,13 @@ static int tap_can_send(void *opaque)
> #ifndef __sun__
> ssize_t tap_read_packet(int tapfd, uint8_t *buf, int maxlen)
> {
> - return read(tapfd, buf, maxlen);
> + ssize_t len;
> +
> + len = read(tapfd, buf, maxlen);
> + if (len > 0) {
> + len = MAX(MIN(maxlen, 40), len);
A small detail :)
40 -> 64 (including a dummy FCS).
> + }
> + return len;
> }
> #endif
>
> --
> 1.7.0.4
>
--
emulated netcards don't work with recent sunos kernel
https://bugs.launchpad.net/bugs/638955
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
Status in QEMU: New
Bug description:
hi there,
i'm using qemu-kvm backend in version: # qemu-kvm -version
QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard
and there are just *not working any of model=$type with combinations of recent sunos (solaris, openindiana, opensolaris, ..) ..
you can download for testing purposes iso from here: http://dlc-origin.openindiana.org/isos/147/ or from here: http://genunix.org/distributions/indiana/ << osol and oi are also bubuntu-like *live cds, so no need to bother with installing
behaviour is as follows:
e1000 - receiving doesn't work, transmitting works .. dladm (tool for handle ethers) shows that is all ok, correct mode is loaded up, it just seems like this driver works at 100% but ..
rtl8169|pcnet - works in 10Mbit mode with several other issues like high cpu utilization and so .. dladm is unable to recognize options for this kind of -nic
others - just don't work
.. i experienced this issue several times in past .. woraround was, that rtl8169 worked so-so .. with recent sunos kernel it doesn't.
it's easy to reproduce, this is why i'm not putting here more then launching script for my virtual machine:
# cat openindiana.sh
qemu-kvm -hda /home/kvm/openindiana/openindiana.img -m 2048 -localtime -cdrom /home/kvm/+images/oi-dev-147-x86.iso -boot d \
-vga std -vnc :9 -k en-us -monitor unix:/home/kvm/openindiana/instance,server,nowait \
-net nic,model=e1000,vlan=1 -net tap,ifname=oi0,script=no,vlan=1 &
sleep 2;
ip l set oi0 up;
ip a a 192.168.99.9/24 dev oi0;
regards by daniel
next prev parent reply other threads:[~2010-09-20 21:16 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-18 20:43 [Qemu-devel] [PATCH] e1000: Pad short frames to minimum size (60 bytes) Stefan Hajnoczi
2010-09-18 20:57 ` Hervé Poussineau
2010-09-18 21:12 ` Stefan Hajnoczi
2010-09-20 8:42 ` Kevin Wolf
2010-09-20 8:51 ` Edgar E. Iglesias
2010-09-20 9:13 ` Stefan Hajnoczi
2010-09-18 21:27 ` Edgar E. Iglesias
2010-09-19 6:36 ` Stefan Hajnoczi
2010-09-19 11:18 ` Michael S. Tsirkin
2010-09-19 12:04 ` Edgar E. Iglesias
2010-09-19 12:03 ` Michael S. Tsirkin
2010-09-20 8:50 ` Kevin Wolf
2010-09-20 9:03 ` Edgar E. Iglesias
2010-09-20 9:34 ` Stefan Hajnoczi
2010-09-20 10:42 ` Michael S. Tsirkin
2010-09-20 20:31 ` Anthony Liguori
2010-09-20 20:35 ` Michael S. Tsirkin
2010-09-20 20:40 ` Edgar E. Iglesias
2010-09-20 20:44 ` Michael S. Tsirkin
2010-09-20 20:51 ` Edgar E. Iglesias [this message]
2010-09-21 9:17 ` Michael S. Tsirkin
2010-09-21 9:21 ` Edgar E. Iglesias
2010-09-21 9:16 ` [Bug 638955] " Stefan Hajnoczi
2011-02-21 21:13 ` [Qemu-devel] " Stefan Weil
2010-09-20 17:52 ` [Qemu-devel] Re: [PATCH] e1000: " Michael S. Tsirkin
-- strict thread matches above, loose matches on Subject: below --
2010-09-15 13:29 [Qemu-devel] [Bug 638955] [NEW] emulated netcards don't work with recent sunos kernel daniel pecka
2010-09-17 8:47 ` [Qemu-devel] [Bug 638955] " daniel pecka
2010-09-17 15:52 ` daniel pecka
2010-09-20 8:02 ` daniel pecka
2010-09-20 9:47 ` Stefan Hajnoczi
2010-09-20 20:57 ` [Bug 638955] Re: [Qemu-devel] [PATCH] e1000: Pad short frames to minimum size (60 bytes) Anthony Liguori
2010-09-20 21:02 ` Edgar E. Iglesias
2010-09-21 8:49 ` [Qemu-devel] [Bug 638955] Re: emulated netcards don't work with recent sunos kernel daniel pecka
2010-10-02 19:23 ` daniel pecka
2010-10-12 14:40 ` [Qemu-devel] " Stefan Hajnoczi
2011-01-03 13:40 ` [Qemu-devel] " daniel pecka
2011-01-04 9:36 ` [Qemu-devel] " Stefan Hajnoczi
2011-01-04 10:04 ` [Qemu-devel] " daniel pecka
2011-01-04 17:51 ` Stefan Weil
2011-01-29 17:41 ` Daniel Kvasnicka
2011-02-28 19:06 ` geppz
2011-03-01 9:50 ` [Qemu-devel] " Stefan Hajnoczi
2011-03-01 15:14 ` [Qemu-devel] " geppz
2011-03-05 20:14 ` Stefan Hajnoczi
2011-03-06 12:32 ` Stefan Hajnoczi
2011-03-07 18:43 ` geppz
2014-10-05 20:57 ` dblade
2014-10-06 8:53 ` Stefan Hajnoczi
2014-10-07 1:46 ` dblade
2015-09-08 22:14 ` Jan Vlug
2015-09-10 19:44 ` Jan Vlug
2016-08-12 4:58 ` T. Huth
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=20100920205136.GB20298@laped.lan \
--to=638955@bugs.launchpad.net \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).