brcmfmac: set pacing shift before transmitting skb to bus

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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200624091608.25154-3-wright.feng@cypress.com
This commit is contained in:
Wright Feng 2020-06-24 04:16:08 -05:00 committed by Kalle Valo
parent fcdd7a875d
commit 2fa8085fc6
1 changed files with 3 additions and 0 deletions

View File

@ -352,6 +352,9 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
if ((skb->priority == 0) || (skb->priority > 7)) if ((skb->priority == 0) || (skb->priority > 7))
skb->priority = cfg80211_classify8021d(skb, NULL); 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); ret = brcmf_proto_tx_queue_data(drvr, ifp->ifidx, skb);
if (ret < 0) if (ret < 0)
brcmf_txfinalize(ifp, skb, false); brcmf_txfinalize(ifp, skb, false);