* [PATCH mac80211-next] mac80211: introduce aql_enable node in debugfs
@ 2020-12-26 9:49 Lorenzo Bianconi
2021-01-04 12:15 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 5+ messages in thread
From: Lorenzo Bianconi @ 2020-12-26 9:49 UTC (permalink / raw)
To: linux-wireless; +Cc: kyan, toke, johannes, lorenzo.bianconi
Introduce aql_enable node in debugfs in order to enable/disable aql.
This is useful for debugging purpose.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
net/mac80211/debugfs.c | 1 +
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/main.c | 1 +
net/mac80211/tx.c | 3 +++
4 files changed, 6 insertions(+)
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 48f144f107d5..898ad57bebd0 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -581,6 +581,7 @@ void debugfs_hw_add(struct ieee80211_local *local)
DEBUGFS_ADD(aql_txq_limit);
debugfs_create_u32("aql_threshold", 0600,
phyd, &local->aql_threshold);
+ debugfs_create_bool("aql_enable", 0600, phyd, &local->aql_enable);
statsd = debugfs_create_dir("statistics", phyd);
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 8bf9c0e974d6..8c9cce373010 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1162,6 +1162,7 @@ struct ieee80211_local {
u32 aql_txq_limit_low[IEEE80211_NUM_ACS];
u32 aql_txq_limit_high[IEEE80211_NUM_ACS];
u32 aql_threshold;
+ bool aql_enable;
atomic_t aql_total_pending_airtime;
const struct ieee80211_ops *ops;
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index dee88ec566ad..b3bec68943c8 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -700,6 +700,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
local->airtime_flags = AIRTIME_USE_TX | AIRTIME_USE_RX;
local->aql_threshold = IEEE80211_AQL_THRESHOLD;
+ local->aql_enable = true;
atomic_set(&local->aql_total_pending_airtime, 0);
INIT_LIST_HEAD(&local->chanctx_list);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 6422da6690f7..86503d47d86e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3832,6 +3832,9 @@ bool ieee80211_txq_airtime_check(struct ieee80211_hw *hw,
if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL))
return true;
+ if (!local->aql_enable)
+ return true;
+
if (!txq->sta)
return true;
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH mac80211-next] mac80211: introduce aql_enable node in debugfs
2020-12-26 9:49 [PATCH mac80211-next] mac80211: introduce aql_enable node in debugfs Lorenzo Bianconi
@ 2021-01-04 12:15 ` Toke Høiland-Jørgensen
2021-01-04 13:20 ` Lorenzo Bianconi
0 siblings, 1 reply; 5+ messages in thread
From: Toke Høiland-Jørgensen @ 2021-01-04 12:15 UTC (permalink / raw)
To: Lorenzo Bianconi, linux-wireless; +Cc: kyan, johannes, lorenzo.bianconi
Lorenzo Bianconi <lorenzo@kernel.org> writes:
> Introduce aql_enable node in debugfs in order to enable/disable aql.
> This is useful for debugging purpose.
Don't mind having a switch, although I wonder if it would be better to
overload the existing debugfs file (e.g., a threshold of 0 could disable
everything?) so as not to clutter up debugfs too much?
-Toke
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH mac80211-next] mac80211: introduce aql_enable node in debugfs
2021-01-04 12:15 ` Toke Høiland-Jørgensen
@ 2021-01-04 13:20 ` Lorenzo Bianconi
2021-01-04 13:47 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 5+ messages in thread
From: Lorenzo Bianconi @ 2021-01-04 13:20 UTC (permalink / raw)
To: Toke Høiland-Jørgensen
Cc: Lorenzo Bianconi, linux-wireless, kyan, Johannes Berg
>
> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>
> > Introduce aql_enable node in debugfs in order to enable/disable aql.
> > This is useful for debugging purpose.
>
> Don't mind having a switch, although I wonder if it would be better to
> overload the existing debugfs file (e.g., a threshold of 0 could disable
> everything?) so as not to clutter up debugfs too much?
>
> -Toke
>
You mean to consider 0 as a special value to disable aql, right? I
would prefer to have a dedicated switch for it since I guess it is
clearer for users (but I can live with it :) )
Regards,
Lorenzo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH mac80211-next] mac80211: introduce aql_enable node in debugfs
2021-01-04 13:20 ` Lorenzo Bianconi
@ 2021-01-04 13:47 ` Toke Høiland-Jørgensen
2021-01-04 13:54 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Toke Høiland-Jørgensen @ 2021-01-04 13:47 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: Lorenzo Bianconi, linux-wireless, kyan, Johannes Berg
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
>>
>> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>>
>> > Introduce aql_enable node in debugfs in order to enable/disable aql.
>> > This is useful for debugging purpose.
>>
>> Don't mind having a switch, although I wonder if it would be better to
>> overload the existing debugfs file (e.g., a threshold of 0 could disable
>> everything?) so as not to clutter up debugfs too much?
>>
>> -Toke
>>
>
> You mean to consider 0 as a special value to disable aql, right? I
> would prefer to have a dedicated switch for it since I guess it is
> clearer for users (but I can live with it :) )
Yeah, maybe a bit clearer but at the cost of clutter. I dunno, not a
strong preference either way; I guess Johannes can make the call :)
-Toke
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH mac80211-next] mac80211: introduce aql_enable node in debugfs
2021-01-04 13:47 ` Toke Høiland-Jørgensen
@ 2021-01-04 13:54 ` Johannes Berg
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2021-01-04 13:54 UTC (permalink / raw)
To: Toke Høiland-Jørgensen, Lorenzo Bianconi
Cc: Lorenzo Bianconi, linux-wireless, kyan
On Mon, 2021-01-04 at 14:47 +0100, Toke Høiland-Jørgensen wrote:
> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
>
> > > Lorenzo Bianconi <lorenzo@kernel.org> writes:
> > >
> > > > Introduce aql_enable node in debugfs in order to enable/disable aql.
> > > > This is useful for debugging purpose.
> > >
> > > Don't mind having a switch, although I wonder if it would be better to
> > > overload the existing debugfs file (e.g., a threshold of 0 could disable
> > > everything?) so as not to clutter up debugfs too much?
> > >
> > > -Toke
> > >
> >
> > You mean to consider 0 as a special value to disable aql, right? I
> > would prefer to have a dedicated switch for it since I guess it is
> > clearer for users (but I can live with it :) )
>
> Yeah, maybe a bit clearer but at the cost of clutter. I dunno, not a
> strong preference either way; I guess Johannes can make the call :)
I'm not sure I care about an extra debugfs file - but I do wonder about
the extra check at runtime that would basically never be true since the
default is enable ...
Maybe that should use a static_branch() or something?
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-04 13:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-26 9:49 [PATCH mac80211-next] mac80211: introduce aql_enable node in debugfs Lorenzo Bianconi
2021-01-04 12:15 ` Toke Høiland-Jørgensen
2021-01-04 13:20 ` Lorenzo Bianconi
2021-01-04 13:47 ` Toke Høiland-Jørgensen
2021-01-04 13:54 ` Johannes Berg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.