linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pkshih <pkshih@realtek.com>
To: 邱名碩 <ccchiu77@gmail.com>, "Andy Huang" <tehuang@realtek.com>,
	"Larry.Finger@lwfinger.net" <Larry.Finger@lwfinger.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"Reto Schneider" <reto.schneider@husqvarnagroup.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: How does the rate adaptive mask work on Realtek WiFi driver
Date: Fri, 14 May 2021 06:08:26 +0000	[thread overview]
Message-ID: <89da58fc162b46558d60495110fcf75f@realtek.com> (raw)
In-Reply-To: <CANgQ54dicgKSZFm3w9sbAYztFw9xBHZnt8aQMNCEfMn_twBbWQ@mail.gmail.com>


> -----Original Message-----
> From: 邱名碩 [mailto:ccchiu77@gmail.com]
> Sent: Monday, May 10, 2021 4:36 PM
> To: Pkshih; Andy Huang; Larry.Finger@lwfinger.net; kuba@kernel.org; kvalo@codeaurora.org; Reto
> Schneider; linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: How does the rate adaptive mask work on Realtek WiFi driver
> 
> Hi guys,
>     I had a problem while verifying the ampdu tx throughput with the
> rtl8xxxu driver on RTL8188CUS module. The throughput number is
> relatively good, 39~42Mbps  TCP on 2.4GHz channel. However, the
> retransmission rate is high, it's 15% ~ 21% with rtl8xxxu driver and
> It's almost the same result with the rtl8192cu driver. I can get
> averagely 7~10% retransmission rate in the same test bed with Realtek
> vendor driver.
> 
>     From the air capture, I can see the rtl8xxxu driver keep sending
> the aggregated frames in MCS7 and doesn't even fall back to lower MCS
> index in the subsequent retries. I can only see very few retried
> packets been sent with MCS0 or 6Mbps grate. On the vendor driver, I'll
> see the retried ampdu packets with MCS4 after 3 retries w/o ack from
> the receiver.
> 
>     From the rate mask command issued by the h2c command, I force both
> the rtl8xxxu driver and vendor driver to use the same ratemask 0xfffff
> (MCS 0-7 and b/g rate included) and leave the arg0 as-is (mostly 0xa0)
> and I expect both drivers can do the rate adaptive thing in the same
> way, but it seems to make no difference. The rtl8xxxu driver still
> sends the packets with highest MCS.
> 
>     Can anyone tell me what should I expect the rate adaptive to work
> with the rate mask 0xfffff and 0xf0000? Does the 0xf0000 means that it
> will pick up a tx rate only between nrate MCS4 to MCS7? I need a base
> line so that I can judge it's simply a rate mask problem or maybe the
> h2c command is not written correctly. Please kindly suggest what I
> should do next. Thanks
> 

The rate mask indicates which rates will be used by rate adaptive mechanism.
I'm not sure the exact bit allocation for CCK/OFDM/MCS, maybe
0x0000f/0x00ff0/0xff0000 for CCK/OFDM/MCS respectively, but you can trace
vendor driver to know the detail.

I suggest you can try to send only OFDM rate mask, and expect to see OFDM
rate only by your sniffer. If it's still keep on MCS7, rate adaptive may
not work properly.

Also, you can compare the content of rate adaptive H2C with vendor driver to
see if the format is correct.

Another thing is to try 'fix_rate' in tx_desc. Check the vendor driver to
know the use_rate/rate/bw fields of tx_desc. Then, try to fix the rate you
want.

--
Ping-Ke


  parent reply	other threads:[~2021-05-14  6:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10  8:35 How does the rate adaptive mask work on Realtek WiFi driver 邱名碩
2021-05-14  4:26 ` 邱名碩
2021-05-14  6:08 ` Pkshih [this message]
2021-05-20  1:28   ` 邱名碩
2021-05-20  2:07     ` Pkshih
     [not found] <CANgQ54cG8FYTTBtrCc=e6aTsFQzfshM=Mco6J5BdtQ7XyH_Byg@mail.gmail.com>
2021-05-10  5:58 ` 邱名碩

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=89da58fc162b46558d60495110fcf75f@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=ccchiu77@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=reto.schneider@husqvarnagroup.com \
    --cc=tehuang@realtek.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).