From: Wen Gong <wgong@codeaurora.org>
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 [thread overview]
Message-ID: <1532589677-16428-2-git-send-email-wgong@codeaurora.org> (raw)
In-Reply-To: <1532589677-16428-1-git-send-email-wgong@codeaurora.org>
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 <wgong@codeaurora.org>
---
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);
--
1.9.1
next prev parent reply other threads:[~2018-07-26 8:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 7:21 [PATCH 0/2] Change sk_pacing_shift in ieee80211_hw for best tx throughput Wen Gong
2018-07-26 7:21 ` Wen Gong [this message]
2018-07-26 14:52 ` [PATCH 1/2] mac80211: Save sk_pacing_shift to ieee80211_hw kbuild test robot
2018-07-27 8:35 ` Wen Gong
2018-07-27 9:30 ` Kalle Valo
2018-07-26 7:21 ` [PATCH 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips Wen Gong
2018-07-26 11:45 ` Toke Høiland-Jørgensen
2018-07-26 13:02 ` Michał Kazior
2018-07-27 9:39 ` Wen Gong
2018-07-27 12:33 ` Michał Kazior
2018-07-27 9:29 ` Wen Gong
2018-07-27 20:06 ` Toke Høiland-Jørgensen
-- strict thread matches above, loose matches on Subject: below --
2018-07-26 7:16 [PATCH 0/2] Change sk_pacing_shift in ieee80211_hw for best tx throughput Wen Gong
2018-07-26 7:16 ` [PATCH 1/2] mac80211: Save sk_pacing_shift to ieee80211_hw 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=1532589677-16428-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).