From: "Igor Kovalenko" <igor.v.kovalenko@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu/hw rtl8139.c
Date: Tue, 11 Jul 2006 01:19:42 +0400 [thread overview]
Message-ID: <b2fa41d60607101419j5805563bq94c8a049722bd7d@mail.gmail.com> (raw)
In-Reply-To: <b2fa41d60607090220k1e9ace4cp12dfc74255754ae2@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 637 bytes --]
On 7/9/06, Igor Kovalenko wrote:
>
> Hi!
>
> This updated patch against current CVS implements TCP segmentation
> offloading for RTL8139 in C+ mode.
> I fixed a couple of problems in implementation (wrong sequence number
> calculation), and now TCP performance seem to be normal.
>
> Dependency on slirp.h header is now gone.
>
> Again tested with linux (ethtool -K eth0 tx on sg on tso on); please
> apply.
>
>
It turned out that a couple of variable types were left dependent on slirp.h
and transmit/receive pointers were not reset in right places (required for
freebsd re driver)
This is an incremental update to fix these problems.
[-- Attachment #1.2: Type: text/html, Size: 985 bytes --]
[-- Attachment #2: rtl8139-20060711-3.diff --]
[-- Type: text/x-patch, Size: 1459 bytes --]
--- hw/rtl8139-20060709-with-working-tso-2.c 2006-07-09 12:41:47.000000000 +0400
+++ hw/rtl8139.c 2006-07-11 01:15:27.000000000 +0400
@@ -40,6 +40,7 @@
* 2006-Jul-09 Igor Kovalenko : Fixed TCP header length calculation while processing
* segmentation offloading
* Removed slirp.h dependency
+ * Added rx/tx buffer reset when enabling rx/tx operation
*/
#include "vl.h"
@@ -1368,10 +1369,14 @@
if (val & CmdRxEnb)
{
DEBUG_PRINT(("RTL8139: ChipCmd enable receiver\n"));
+
+ s->currCPlusRxDesc = 0;
}
if (val & CmdTxEnb)
{
DEBUG_PRINT(("RTL8139: ChipCmd enable transmitter\n"));
+
+ s->currCPlusTxDesc = 0;
}
/* mask unwriteable bits */
@@ -2078,8 +2083,8 @@
/* ip packet header */
ip_header *ip = 0;
int hlen = 0;
- u_int8_t ip_protocol = 0;
- u_int16_t ip_data_len = 0;
+ uint8_t ip_protocol = 0;
+ uint16_t ip_data_len = 0;
uint8_t *eth_payload_data = 0;
size_t eth_payload_len = 0;
@@ -2450,8 +2455,6 @@
DEBUG_PRINT(("RTL8139: TxAddr write offset=0x%x val=0x%08x\n", txAddrOffset, val));
s->TxAddr[txAddrOffset/4] = le32_to_cpu(val);
-
- s->currCPlusTxDesc = 0;
}
static uint32_t rtl8139_TxAddr_read(RTL8139State *s, uint32_t txAddrOffset)
next prev parent reply other threads:[~2006-07-10 21:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-04 10:08 [Qemu-devel] qemu/hw rtl8139.c Fabrice Bellard
2006-07-04 21:45 ` Igor Kovalenko
2006-07-09 9:20 ` Igor Kovalenko
2006-07-10 21:19 ` Igor Kovalenko [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-03-13 19:17 Aurelien Jarno
2007-11-09 18:17 Thiemo Seufer
2007-08-01 13:10 Thiemo Seufer
2007-04-07 1:41 Paul Brook
2007-03-19 18:20 Thiemo Seufer
2006-07-10 21:38 Fabrice Bellard
2006-07-04 11:23 ZIGLIO, Frediano, VF-IT
2006-07-01 21:41 Fabrice Bellard
2006-07-03 14:17 ` Paul Brook
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=b2fa41d60607101419j5805563bq94c8a049722bd7d@mail.gmail.com \
--to=igor.v.kovalenko@gmail.com \
--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).