From: Kalle Valo <kvalo@codeaurora.org>
To: Wen Gong <wgong@codeaurora.org>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v5 8/8] ath10k: enable napi on RX path for sdio
Date: Mon, 23 Sep 2019 12:22:22 +0300 [thread overview]
Message-ID: <87tv938j01.fsf@codeaurora.org> (raw)
In-Reply-To: <1567679893-14029-9-git-send-email-wgong@codeaurora.org> (Wen Gong's message of "Thu, 5 Sep 2019 18:38:13 +0800")
Wen Gong <wgong@codeaurora.org> writes:
> For tcp RX, the quantity of tcp acks to remote is 1/2 of the quantity
> of tcp data from remote, then it will have many small length packets
> on TX path of sdio bus, then it reduce the RX packets's bandwidth of
> tcp.
>
> This patch enable napi on RX path, then the RX packet of tcp will not
> feed to tcp stack immeditely from mac80211 since GRO is enabled by
> default, it will feed to tcp stack after napi complete, if rx bundle
> is enabled, then it will feed to tcp stack one time for each bundle
> of RX. For example, RX bundle size is 32, then tcp stack will receive
> one large length packet, its length is neary 1500*32, then tcp stack
> will send a tcp ack for this large packet, this will reduce the tcp
> acks ratio from 1/2 to 1/32. This results in significant performance
> improvement for tcp RX.
>
> Tcp rx throughout is 240Mbps without this patch, and it arrive 390Mbps
> with this patch. The cpu usage has no obvious difference with and
> without NAPI.
>
> call stack for each RX packet on GRO path:
> (skb length is about 1500 bytes)
> skb_gro_receive ([kernel.kallsyms])
> tcp4_gro_receive ([kernel.kallsyms])
> inet_gro_receive ([kernel.kallsyms])
> dev_gro_receive ([kernel.kallsyms])
> napi_gro_receive ([kernel.kallsyms])
> ieee80211_deliver_skb ([mac80211])
> ieee80211_rx_handlers ([mac80211])
> ieee80211_prepare_and_rx_handle ([mac80211])
> ieee80211_rx_napi ([mac80211])
> ath10k_htt_rx_proc_rx_ind_hl ([ath10k_core])
> ath10k_htt_rx_pktlog_completion_handler ([ath10k_core])
> ath10k_sdio_napi_poll ([ath10k_sdio])
> net_rx_action ([kernel.kallsyms])
> softirqentry_text_start ([kernel.kallsyms])
> do_softirq ([kernel.kallsyms])
>
> call stack for napi complete and send tcp ack from tcp stack:
> (skb length is about 1500*32 bytes)
> _tcp_ack_snd_check ([kernel.kallsyms])
> tcp_v4_do_rcv ([kernel.kallsyms])
> tcp_v4_rcv ([kernel.kallsyms])
> local_deliver_finish ([kernel.kallsyms])
> ip_local_deliver ([kernel.kallsyms])
> ip_rcv_finish ([kernel.kallsyms])
> ip_rcv ([kernel.kallsyms])
> netif_receive_skb_core ([kernel.kallsyms])
> netif_receive_skb_one_core([kernel.kallsyms])
> netif_receive_skb ([kernel.kallsyms])
> netif_receive_skb_internal ([kernel.kallsyms])
> napi_gro_complete ([kernel.kallsyms])
> napi_gro_flush ([kernel.kallsyms])
> napi_complete_done ([kernel.kallsyms])
> ath10k_sdio_napi_poll ([ath10k_sdio])
> net_rx_action ([kernel.kallsyms])
> __softirqentry_text_start ([kernel.kallsyms])
> do_softirq ([kernel.kallsyms])
>
> Tested with QCA6174 SDIO with firmware
> WLAN.RMH.4.4.1-00007-QCARMSWP-1.
>
> Signed-off-by: Wen Gong <wgong@codeaurora.org>
[...]
> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
> @@ -2263,7 +2263,7 @@ static bool ath10k_htt_rx_proc_rx_ind_hl(struct ath10k_htt *htt,
> if (mpdu_ranges->mpdu_range_status == HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR)
> rx_status->flag |= RX_FLAG_MMIC_ERROR;
>
> - ieee80211_rx_ni(ar->hw, skb);
> + ieee80211_rx_napi(ar->hw, NULL, skb, &ar->napi);
Doesn't this break USB?
--
Kalle Valo
next prev parent reply other threads:[~2019-09-23 9:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 10:38 [PATCH v5 0/8] ath10k: improve throughout of tcp/udp TX/RX of sdio Wen Gong
2019-09-05 10:38 ` [PATCH v5 1/8] ath10k: adjust skb length in ath10k_sdio_mbox_rx_packet Wen Gong
2019-09-12 13:46 ` Kalle Valo
2019-09-12 14:02 ` Nicolas Boichat
2019-09-12 14:54 ` Kalle Valo
2019-09-05 10:38 ` [PATCH v5 2/8] ath10k: enable RX bundle receive for sdio Wen Gong
2019-09-21 12:15 ` Kalle Valo
2019-09-05 10:38 ` [PATCH v5 3/8] ath10k: change max RX bundle size from 8 to 32 " Wen Gong
2019-09-23 9:05 ` Kalle Valo
2019-09-24 9:32 ` Wen Gong
2019-09-05 10:38 ` [PATCH v5 4/8] ath10k: add workqueue for RX path of sdio Wen Gong
2019-09-23 9:49 ` Kalle Valo
2019-09-05 10:38 ` [PATCH v5 5/8] ath10k: disable TX complete indication of htt for sdio Wen Gong
2019-09-21 12:02 ` Kalle Valo
2019-09-05 10:38 ` [PATCH v5 6/8] ath10k: add htt TX bundle " Wen Gong
2019-09-05 10:38 ` [PATCH v5 7/8] ath10k: enable alt data of TX path " Wen Gong
2019-09-05 10:38 ` [PATCH v5 8/8] ath10k: enable napi on RX " Wen Gong
2019-09-23 9:22 ` Kalle Valo [this message]
2019-09-12 15:39 ` [PATCH v5 0/8] ath10k: improve throughout of tcp/udp TX/RX of sdio Kalle Valo
2019-09-12 17:51 ` Kalle Valo
2019-09-13 3:54 ` Wen Gong
2019-09-20 12:44 ` Kalle Valo
2019-09-23 9:29 ` Kalle Valo
2019-09-24 12:32 ` Wen Gong
2019-09-26 2:33 ` Wen Gong
2019-10-14 11:53 ` Wen Gong
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=87tv938j01.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=wgong@codeaurora.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).