ath9k: add reset for airtime station debugfs
Subsystems (3)
PATCH 1/1 ath9k: add reset for airtime station debugfs
Let user can reset station airtime status by debugfs, it will reset all airtime deficit to ATH_AIRTIME_QUANTUM and reset rx/tx airtime accumulate to 0.
--- drivers/net/wireless/ath/ath9k/debug_sta.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/debug_sta.c +17 -1
@@ -286,9 +286,25 @@ static ssize_t read_airtime(struct file *file, char __user *user_buf,return retval; } +static ssize_t +write_airtime_reset_stub (struct file *file,const char __user *ubuf, +size_t count,loff_t *ppos) +{ +struct ath_node *an = file->private_data; +struct ath_airtime_stats *astats; +int i; + + astats = &an->airtime_stats; + astats->rx_airtime =0 ; + astats->tx_airtime =0 ; +for (i =0 ; i <4 ; i++) + an->airtime_deficit[i] =ATH_AIRTIME_QUANTUM ; +return count; +}static const struct file_operations fops_airtime = { .read = read_airtime, + .write = write_airtime_reset_stub, .open = simple_open, .owner =THIS_MODULE , .llseek = default_llseek,
@@ -304,5 +320,5 @@ void ath9k_sta_add_debugfs(struct ieee80211_hw *hw,debugfs_create_file ("node_aggr" ,0444 , dir, an, &fops_node_aggr);debugfs_create_file ("node_recv" ,0444 , dir, an, &fops_node_recv); -debugfs_create_file ("airtime" ,0444 , dir, an, &fops_airtime); +debugfs_create_file ("airtime" ,0644 , dir, an, &fops_airtime); }
Signature · 1 line
2.18.0
Quoted 3 lines · Louie Lu
Let user can reset station airtime status by debugfs, it will reset all airtime deficit to
ATH_AIRTIME_QUANTUMand reset rx/tx airtime accumulate to 0.
No objections to the patch, but I'm curious which issues you were debugging that led you to needing it? :)
-Toke
A message that is not in the archive (sent off-list or not yet received): CADMDV=ws-iM6+L+CLyrGK=srV56jbYgBbOVWg2AxEX0gR6t8WQ@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CADMDV=ws-iM6+L+CLyrGK=srV56jbYgBbOVWg2AxEX0gR6t8WQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 8 lines · Louie Lu
Toke Høiland-Jørgensen <[email protected]> 於 2018年9月6日 週四 下午5:27寫道:
Quoted 6 lines
Quoted 3 lines · Louie Lu
Let user can reset station airtime status by debugfs, it will reset all airtime deficit to
ATH_AIRTIME_QUANTUMand reset rx/tx airtime accumulate to 0.
Quoted 5 lines
Quoted 3 lines
No objections to the patch, but I'm curious which issues you were debugging that led you to needing it? :)
I'm testing to get the packet queue time + airtime in
ath_tx_process_buffer,
Right; I've been thinking that it would be useful to make the CoDel enqueue time available to drivers. And minstrel, for that matter (lowering the number of retries for packets that has queued for a long time, for instance). Good to hear that others are looking into something similar :)
Quoted 5 lines
it would be useful if I can reset the station airtime accumulated value, so I can observe in each test round (e.g. 5 ping) airtime accumulated
Also to reset the deficit to make sure it run like fresh one.
Yup, makes sense.
-Toke
Quoted 4 lines · On Thu, Sep 6, 2018 at 4:13 AM Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.=…
Quoted 1 line · Louie Lu
Toke H=C3=B8iland-J=C3=B8rgensen <[email protected]> =E6=96=BC 2018=E5=B9=B4=
9=E6=9C=886=E6=97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8B=E5=8D=885:27=E5=AF=AB=E9= =81=93=EF=BC=9A
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines · Louie Lu
Let user can reset station airtime status by debugfs, it will reset all airtime deficit to
ATH_AIRTIME_QUANTUMand reset rx/tx airtime accumulate to 0.No objections to the patch, but I'm curious which issues you were debugging that led you to needing it? :)
Quoted 8 lines
Quoted 2 lines
I'm testing to get the packet queue time + airtime in
ath_tx_process_buffer,Right; I've been thinking that it would be useful to make the CoDel enqueue time available to drivers. And minstrel, for that matter (lowering the number of retries for packets that has queued for a long time, for instance). Good to hear that others are looking into something similar :)
Yea! Seeing retransmits scale down would be a goodness. Last I looked ath9k was at, like 10?, when it should be, like, 2, at mcs0 and 10 at mcs15.
I can't seem to publish a link to this directly, but it's open access if you search via https://scholar.google.com/:
"Resolving Bufferbloat in TCP Communication over IEEE 802.11 n WLAN by Reducing MAC Retransmission Limit at Low Data Rate"
even their simple bifurcated model worked well.
Quoted 10 lines
Quoted 6 lines
it would be useful if I can reset the station airtime accumulated value, so I can observe in each test round (e.g. 5 ping) airtime accumulated
Also to reset the deficit to make sure it run like fresh one.
Yup, makes sense.
-Toke
--=20
Dave T=C3=A4ht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619
Previous mail rejects by mailing list, re-send again...
Toke Høiland-Jørgensen <[email protected]> 於 2018年9月6日 週四 下午5:27寫道:
Quoted 10 lines
Quoted 3 lines · Louie Lu
Let user can reset station airtime status by debugfs, it will reset all airtime deficit to
ATH_AIRTIME_QUANTUMand reset rx/tx airtime accumulate to 0.No objections to the patch, but I'm curious which issues you were debugging that led you to needing it? :)
I'm testing to get the packet queue time + airtime in ath_tx_process_buffer, it would be useful if I can reset the station airtime accumulated value, so I can observe in each test round (e.g. 5 ping) airtime accumulated
Also to reset the deficit to make sure it runs like fresh one.
Louie.
Quoted 2 lines
-Toke
Quoted 6 lines · Louie Lu
Let user can reset station airtime status by debugfs, it will reset all airtime deficit to
ATH_AIRTIME_QUANTUMand reset rx/tx airtime accumulate to 0.Signed-off-by Louie Lu <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
3fa8d2186550 ath9k: add reset for airtime station debugfs
Signature · 3 lines
https://patchwork.kernel.org/patch/10589835/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches