From: "Igor Kovalenko" <igor.v.kovalenko@gmail.com>
To: qemu-devel@nongnu.org
Cc: Xen Development Mailing List <xen-devel@lists.xensource.com>
Subject: Re: [Qemu-devel] Re: qemu/rtl8139: Max transmit frame size
Date: Fri, 22 Dec 2006 02:11:48 +0300 [thread overview]
Message-ID: <b2fa41d60612211511w54a40569hfe26f4e39dc2d0f6@mail.gmail.com> (raw)
In-Reply-To: <20061117002945.GA16145@gondor.apana.org.au>
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
On 11/17/06, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Wed, Nov 15, 2006 at 03:38:27PM +1100, herbert wrote:
> >
> > CP_TX_BUFFER_SIZE is already 64K. So it seems to me that we don't need
> > the while loop to extend the buffer at all since no transmitted packet
> > should be anywhere near this size.
> >
> > Are there any objections to getting rid of the following while loop
> > altogether and replacing it with a straight failure?
>
> Since I haven't heard any objections, here is a patch to do just that.
>
> [QEMU] rtl8139: Disallow chaining above 64K
>
> As it stands the 8139C+ TX chaining is only bounded by realloc failure.
> This is contrary to how the real hardware operates. It also has DoS
> potential when ioemu runs in dom0.
>
> This patch makes any attempt to chain a frame beyond 64K fail immediately.
>
True, a limit would be useful. It may be possible to start a chain at first
TX descriptor and keep feeding the card with new buffers while hardware is
sending older ones, without underrun, if checksum offloading is disabled.
Emulation is assembling a complete packet to feed slirp routine - so there
is another limit on packet size, the one slirp is able to handle.
It would be nice to know what is the actual hardware limit for chaining.
Only reference to 64K I found in docs is referring to receive ring buffer
size in "C" mode.
--
Kind Regards,
Igor V. Kovalenko
[-- Attachment #2: Type: text/html, Size: 1783 bytes --]
prev parent reply other threads:[~2006-12-21 23:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-15 4:38 [Qemu-devel] qemu/rtl8139: Max transmit frame size Herbert Xu
2006-11-17 0:29 ` [Qemu-devel] " Herbert Xu
2006-11-17 0:45 ` Herbert Xu
2006-12-21 23:11 ` Igor Kovalenko [this message]
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=b2fa41d60612211511w54a40569hfe26f4e39dc2d0f6@mail.gmail.com \
--to=igor.v.kovalenko@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=xen-devel@lists.xensource.com \
/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).