linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wen Gong <wgong@codeaurora.org>
To: ath10k@lists.infradead.org, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v2 1/2] mac80211: Change sk_pacing_shift saved to ieee80211_hw
Date: Wed,  8 Aug 2018 18:40:01 +0800	[thread overview]
Message-ID: <1533724802-30944-2-git-send-email-wgong@codeaurora.org> (raw)
In-Reply-To: <1533724802-30944-1-git-send-email-wgong@codeaurora.org>

Add the skb_pacing_shift adjustment, 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 <wgong@codeaurora.org>
---
V2:
-add the description for tx_sk_pacing_shift
 include/net/mac80211.h | 5 +++++
 net/mac80211/main.c    | 2 ++
 net/mac80211/tx.c      | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5790f55..9804d65 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2290,6 +2290,10 @@ enum ieee80211_hw_flags {
  *	supported by HW.
  * @max_nan_de_entries: maximum number of NAN DE functions supported by the
  *	device.
+ *
+ * @tx_sk_pacing_shift: The TCP stack allow more than a single ms of data
+ *	to be queued in the stack. The value is a bit-shift of 1 second, e.g. 8
+ *	is ~4ms of queued data. It only affects local TCP sockets.
  */
 struct ieee80211_hw {
 	struct ieee80211_conf conf;
@@ -2325,6 +2329,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 4fb2709..23490fa 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -594,6 +594,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 6a79d56..80855a8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3601,7 +3601,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);
 
-- 
1.9.1

  reply	other threads:[~2018-08-08 12:59 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 10:40 [PATCH v2 0/2] Change sk_pacing_shift in ieee80211_hw for best tx throughput Wen Gong
2018-08-08 10:40 ` Wen Gong [this message]
2018-08-08 10:40 ` [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips Wen Gong
2018-08-08 10:43   ` Toke Høiland-Jørgensen
2018-08-10  8:05     ` Wen Gong
2018-08-10 13:17       ` Toke Høiland-Jørgensen
2018-08-13  5:37         ` Wen Gong
2018-08-13 11:18           ` Toke Høiland-Jørgensen
2018-08-14  5:55             ` Wen Gong
2018-08-17 11:32               ` Toke Høiland-Jørgensen
2018-08-30 23:25                 ` Peter Oh
2018-08-31 15:36                   ` Toke Høiland-Jørgensen
     [not found]           ` <CANEJEGvcj9gPT8yy++qvi3hz3t9pAXyeUves06gr+ADfn9Ouhg@mail.gmail.com>
2018-09-03  9:38             ` Johannes Berg
2018-09-03 11:11               ` Toke Høiland-Jørgensen
2018-09-03 11:47                 ` Johannes Berg
2018-09-03 13:35                   ` Toke Høiland-Jørgensen
2018-09-03 14:57                     ` Dave Taht
2018-09-03 15:35                       ` Dave Taht
2018-09-04 23:43                     ` Grant Grundler
2018-09-05  7:23                       ` Wen Gong
2018-09-06 10:18                       ` Toke Høiland-Jørgensen
2019-02-20 19:15                         ` Grant Grundler
2019-02-21  4:39                           ` Kalle Valo
2019-02-21 15:42                           ` Toke Høiland-Jørgensen
2019-02-21 16:10                             ` Kalle Valo
2019-02-21 16:22                               ` Ben Greear
2019-02-21 16:37                                 ` Toke Høiland-Jørgensen
2019-02-21 16:57                                   ` Ben Greear
2019-02-21 17:15                                     ` Toke Høiland-Jørgensen
2019-02-21 17:29                                       ` [PATCH] mac80211: Change default tx_sk_pacing_shift to 7 Toke Høiland-Jørgensen
2019-02-22 12:29                                         ` Johannes Berg
2019-02-22 13:06                                           ` Toke Høiland-Jørgensen
2019-02-22 13:07                                             ` Johannes Berg
2019-02-22 13:40                                               ` Toke Høiland-Jørgensen
2019-02-22 19:10                                                 ` Johannes Berg
2019-02-23 11:49                                                   ` Toke Høiland-Jørgensen
2019-02-21 17:29                                       ` [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips Ben Greear
2019-02-21 22:50                                         ` Toke Høiland-Jørgensen
2019-02-21 16:28                               ` Toke Høiland-Jørgensen
2020-04-23  6:31   ` Kalle Valo
2018-08-08 19:00 ` [PATCH v2 0/2] Change sk_pacing_shift in ieee80211_hw for best tx throughput Peter Oh
2018-08-09  9:32   ` Arend van Spriel
2018-08-10 13:20     ` Toke Høiland-Jørgensen
2018-08-10 19:28       ` Arend van Spriel
2018-08-10 19:52         ` Ben Greear
2018-08-11 19:21           ` Arend van Spriel
2018-08-20 12:46             ` Toke Høiland-Jørgensen
2018-08-20 15:14               ` Ben Greear

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=1533724802-30944-2-git-send-email-wgong@codeaurora.org \
    --to=wgong@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --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 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).