qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Tobias Fiebig <tobias@fiebig.nl>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org, qemu-stable@nongnu.org,
	Russell King - ARM Linux <linux@armlinux.org.uk>
Subject: Re: [PATCH for-7.2] rtl8139: honor large send MSS value
Date: Wed, 16 Nov 2022 14:54:22 +0800	[thread overview]
Message-ID: <CACGkMEtJ2+2yhHgD33wiWvUEREei2ThQAkRNFWzRrDt5D50u+g@mail.gmail.com> (raw)
In-Reply-To: <011801d8f967$5dad0f00$19072d00$@fiebig.nl>

On Wed, Nov 16, 2022 at 10:59 AM Tobias Fiebig <tobias@fiebig.nl> wrote:
>
> Heho,
> I just tested around with the patch;
> Good news: Certainly my builds are being executed. Also, if I patch the old code to have a MAX_MTU <= the max MTU on my path, throughput is ok.
>
> Bad news: Something is wrong with getting the MSS in the patch you shared. When enabling DPRINT, values are off (sent MSS vs. printed MSS):
> 600 2060
> 800 2308
> 1000 2316
> 1023 2307
> 1200 3076
> 1400 3340 (most likely clamped to 1320)
>
> Fiddling around a bit more, I found txdw0 printed earlier in the stack as hex (sent MSS, txdw0):
> 769 900502f5
> 1000 900503dc
> 1280 900504f4
> 1281 900504f5
> 1301 90050509
> 1317 90050519
> 1320 9005051c
>
> This maps rather well to:
> MSS = txdw0 - 2416246772
> MSS = txdw0 - 9004FFF4
>
> Sadly, my C is 'non-existent' and it is kind-of 4AM, so also not in the brainspace to fill those gaps. But if one of you could look at the patch again, that would be nice. Otherwise, I should have some brainspace for this tomorrow night (UTC) again.
>

Ok, I think I found at least one issue:

/* large send MSS mask, bits 16...25 */
#define CP_TC_LGSEN_MSS_MASK ((1 << 12) - 1)

First, MSS occupies 11 bits from 16 to 26
Second, the mask is wrong it should be ((1 << 11) - 1)

Thanks

> With best regards,
> Tobias
>



  reply	other threads:[~2022-11-16  6:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15 16:36 [PATCH for-7.2] rtl8139: honor large send MSS value Stefan Hajnoczi
2022-11-15 23:36 ` Tobias Fiebig
2022-11-16  4:19   ` Jason Wang
2022-11-16  2:58 ` Tobias Fiebig
2022-11-16  6:54   ` Jason Wang [this message]
2022-11-16 10:04     ` Tobias Fiebig
2022-11-16 11:20     ` Tobias Fiebig
2022-11-16 15:47       ` Stefan Hajnoczi
2022-11-17  2:49         ` Tobias Fiebig
2022-11-17 11:07           ` Stefan Hajnoczi
2022-11-17 11:15             ` Stefan Hajnoczi
2022-11-17 11:26               ` Tobias Fiebig
2022-11-17 16:56                 ` Stefan Hajnoczi
2022-11-17 17:02                   ` Tobias Fiebig
2022-11-17 20:42                   ` Tobias Fiebig
2022-11-17 22:51                     ` Stefan Hajnoczi
2022-11-18  7:10                 ` Jason Wang
2022-11-16  4:13 ` Jason Wang

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=CACGkMEtJ2+2yhHgD33wiWvUEREei2ThQAkRNFWzRrDt5D50u+g@mail.gmail.com \
    --to=jasowang@redhat.com \
    --cc=linux@armlinux.org.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=tobias@fiebig.nl \
    /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).