From patchwork Thu Jul 26 07:21:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Gong X-Patchwork-Id: 10545361 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F087139A for ; Thu, 26 Jul 2018 07:21:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 347C62AD6D for ; Thu, 26 Jul 2018 07:21:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28D872AD76; Thu, 26 Jul 2018 07:21:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14E912AD74 for ; Thu, 26 Jul 2018 07:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729105AbeGZIg5 (ORCPT ); Thu, 26 Jul 2018 04:36:57 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60994 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729093AbeGZIg4 (ORCPT ); Thu, 26 Jul 2018 04:36:56 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 50BBE60BB0; Thu, 26 Jul 2018 07:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532589687; bh=LGUk3sa1NS/yKFgefUCwfJ0l/UEHM1zUuew+fQd2hRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eXZFVo1TGPkIUN0xiRhNNKujt7u/f/vxqsKyX6dtvzk7CmiR0uBZdLxrEOpGxlEgM bgggPBf9HRoKpHq0pKxCVJTYpnwoPyFg88xs4fs1L0HdPH9YRRIxtD+AjkgVIYZ9n+ LxUwq56Ab91cGjkVlWEm7Q8HxTslb5QctFqwk2T4= Received: from localhost.localdomain (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wgong@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 23FDC60BE8; Thu, 26 Jul 2018 07:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532589686; bh=LGUk3sa1NS/yKFgefUCwfJ0l/UEHM1zUuew+fQd2hRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a0Gd0XdJKyQokmtwhQfT8RsiLNae5I1MKWwFKVgU/s5yhjdvpTPkYX0AwIOR1qT2p iWby5c5KvjeiNXYVLfm4JfqaqlSyNya/BWGYsqDe744oHS+uGSj6G0BTpNSJjH8Ss6 t1t0E5Z2WuBn5c4SjrIBMHywcg98wOcyRDXeb2ys= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 23FDC60BE8 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=wgong@codeaurora.org From: Wen Gong To: ath10k@lists.infradead.org, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 1/2] mac80211: Save sk_pacing_shift to ieee80211_hw Date: Thu, 26 Jul 2018 15:21:16 +0800 Message-Id: <1532589677-16428-2-git-send-email-wgong@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532589677-16428-1-git-send-email-wgong@codeaurora.org> References: <1532589677-16428-1-git-send-email-wgong@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the skb_pacing_shirt adjustment, but this change make it configurable for other driver. If no other driver set it, then mac8011 will use the default value. Signed-off-by: Wen Gong --- include/net/mac80211.h | 1 + net/mac80211/main.c | 2 ++ net/mac80211/tx.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 851a5e1..f600d08 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2279,6 +2279,7 @@ struct ieee80211_hw { u8 n_cipher_schemes; const struct ieee80211_cipher_scheme *cipher_schemes; u8 max_nan_de_entries; + u8 tx_sk_pacing_shift; }; static inline bool _ieee80211_hw_check(struct ieee80211_hw *hw, diff --git a/net/mac80211/main.c b/net/mac80211/main.c index fb73451..72dce49 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -584,6 +584,8 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, local->ops = ops; local->use_chanctx = use_chanctx; + local->hw.tx_sk_pacing_shift = 8; + /* set up some defaults */ local->hw.queues = 1; local->hw.max_rates = 1; diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 44b5dfe..a2d61b9 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3596,7 +3596,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb, * second, so 8 is ~4ms of queued data. Only affects local TCP * sockets. */ - sk_pacing_shift_update(skb->sk, 8); + sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift); fast_tx = rcu_dereference(sta->fast_tx); From patchwork Thu Jul 26 07:21:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Gong X-Patchwork-Id: 10545365 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F676A635 for ; Thu, 26 Jul 2018 07:21:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17B1E2AD6D for ; Thu, 26 Jul 2018 07:21:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C3692AD76; Thu, 26 Jul 2018 07:21:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8FAF2AD6D for ; Thu, 26 Jul 2018 07:21:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729111AbeGZIg7 (ORCPT ); Thu, 26 Jul 2018 04:36:59 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33034 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729093AbeGZIg7 (ORCPT ); Thu, 26 Jul 2018 04:36:59 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 673DA60C8A; Thu, 26 Jul 2018 07:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532589689; bh=Rl37eobkmsVs6Xvi8+/6Hf+0cvfPIZRHM7MkLWeU/pA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oea1sOJOoXdyw6Yi8f8alDUZvdiWNmZBY+7GxpmuedXB6bAdeGsTbaoy1JtIfQka+ fVPlEKkUoJfifZOIh2E9Zh0C4lxC+gbA1MkS8sEOc1KLp92wCvLG06mfQClMDx5mBJ bxD//jTjG3rRuUv6RHWTFuPCa+GGgXh+Fgt9S+Q0= Received: from localhost.localdomain (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wgong@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id CA8C660C6A; Thu, 26 Jul 2018 07:21:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532589687; bh=Rl37eobkmsVs6Xvi8+/6Hf+0cvfPIZRHM7MkLWeU/pA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cWg8BOCF2U66pxZspLv09fdTgvc7NvO7zQtTJK/4Y0HaElgokQyJhxp0nW/eE/teg QRAmM+TWtG/mvdBq1R6SU2xYjZNwdfDmen+qoLCI+2D1L2whaAy8xWJ5+8OCKcwjWE 9UoC9WZOwntnqPdgiUr7npe7gG1JwpS9Ku3lEBT8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CA8C660C6A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=wgong@codeaurora.org From: Wen Gong To: ath10k@lists.infradead.org, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips Date: Thu, 26 Jul 2018 15:21:17 +0800 Message-Id: <1532589677-16428-3-git-send-email-wgong@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532589677-16428-1-git-send-email-wgong@codeaurora.org> References: <1532589677-16428-1-git-send-email-wgong@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Upstream kernel has an interface to help adjust sk_pacing_shift to help improve TCP UL throughput. The sk_pacing_shift is 8 in mac80211, this is based on test with 11N WiFi chips with ath9k. For QCA6174/QCA9377 PCI 11AC chips, the 11AC VHT80 TCP UL throughput testing result shows 6 is the optimal. Overwrite the sk_pacing_shift to 6 in ath10k driver. Tested with QCA6174 PCI with firmware WLAN.RM.4.4.1-00109-QCARMSWPZ-1, but this will also affect QCA9377 PCI. It's not a regression with new firmware releases. There have 2 test result of different settings: ARM CPU based device with QCA6174A PCI with different sk_pacing_shift: sk_pacing_shift throughput(Mbps) CPU utilization 6 500(-P5) ~75% idle, Focus on CPU1: ~14%idle 7 454(-P5) ~80% idle, Focus on CPU1: ~4%idle 8 288 ~90% idle, Focus on CPU1: ~35%idle 9 ~200 ~92% idle, Focus on CPU1: ~50%idle 5G TCP UL VTH80 on X86 platform with QCA6174A PCI with sk_packing_shift set to 6: tcp_limit_output_bytes throughput(Mbps) default(262144)+1 Stream 336 default(262144)+2 Streams 558 default(262144)+3 Streams 584 default(262144)+4 Streams 602 default(262144)+5 Streams 598 changed(2621440)+1 Stream 598 changed(2621440)+2 Streams 601 Signed-off-by: Wen Gong --- drivers/net/wireless/ath/ath10k/mac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index f31ae3b..40d24c1 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -8348,6 +8348,8 @@ int ath10k_mac_register(struct ath10k *ar) ar->hw->wiphy->max_scan_ssids = WLAN_SCAN_PARAMS_MAX_SSID; ar->hw->wiphy->max_scan_ie_len = WLAN_SCAN_PARAMS_MAX_IE_LEN; + ar->hw->tx_sk_pacing_shift = 6; + ar->hw->vif_data_size = sizeof(struct ath10k_vif); ar->hw->sta_data_size = sizeof(struct ath10k_sta); ar->hw->txq_data_size = sizeof(struct ath10k_txq);