All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wright Feng <wright.feng@cypress.com>
To: linux-wireless@vger.kernel.org
Cc: wright.feng@cypress.com, brcm80211-dev-list@broadcom.com,
	brcm80211-dev-list@cypress.com,
	Arend van Spriel <arend.vanspriel@broadcom.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	chi-hsien.lin@cypress.com
Subject: [PATCH v2 2/2] brcmfmac: set pacing shift before transmitting skb to bus
Date: Wed, 24 Jun 2020 04:16:08 -0500	[thread overview]
Message-ID: <20200624091608.25154-3-wright.feng@cypress.com> (raw)
In-Reply-To: <20200624091608.25154-1-wright.feng@cypress.com>

Linux 3.6 introduces TSQ which has a per socket threshold for TCP Tx
packet to reduce latency. In flow control mode, host driver enqueues skb
in hanger and TCP doesn't push new skb frees until host frees the skb when
receiving fwstatus event. So set pacing shift 8 to send them as a single
large aggregate frame to the bus layer.

43455 TX TCP throughput in different FC modes on Linux 5.4.18

sk_pacing_shift : Throughput (fcmode=0)
10: 245 Mbps
 9: 245 Mbps
 8: 246 Mbps
 7: 246 Mbps

sk_pacing_shift : Throughput (fcmode=1)
10: 182 Mbps
 9: 197 Mbps
 8: 206 Mbps
 7: 207 Mbps

sk_pacing_shift : Throughput (fcmode=2)
10: 180 Mbps
 9: 197 Mbps
 8: 206 Mbps
 7: 207 Mbps

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
---
v2:
 - Add more testing results

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index c88655acc78c..f89010a81ffb 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -352,6 +352,9 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
 	if ((skb->priority == 0) || (skb->priority > 7))
 		skb->priority = cfg80211_classify8021d(skb, NULL);
 
+	/* set pacing shift for packet aggregation */
+	sk_pacing_shift_update(skb->sk, 8);
+
 	ret = brcmf_proto_tx_queue_data(drvr, ifp->ifidx, skb);
 	if (ret < 0)
 		brcmf_txfinalize(ifp, skb, false);
-- 
2.25.0


      parent reply	other threads:[~2020-06-24  9:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24  9:16 [PATCH v2 0/2] brcmfmac: Stability and throughput changes Wright Feng
2020-06-24  9:16 ` [PATCH v2 1/2] brcmfmac: set state of hanger slot to FREE when flushing PSQ Wright Feng
2020-07-14  9:50   ` Kalle Valo
2020-06-24  9:16 ` Wright Feng [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=20200624091608.25154-3-wright.feng@cypress.com \
    --to=wright.feng@cypress.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=chi-hsien.lin@cypress.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.