Re: [RFCv2 0/3] mac80211: implement fq codel

2016-03-22 Thread Toke Høiland-Jørgensen
Michal Kazior writes: > traffic-gen generates only BE traffic. Everything else runs UDP_RR > which doesn't generate a lot of traffic. Good point. Fixed that: the newest git version of traffic-gen supports a -t parameter which will be set as the TOS byte on outgoing

Re: [PATCH 2/2] ath10k: add per peer tx stats support for 10.2.4

2017-11-30 Thread Toke Høiland-Jørgensen
>> +struct ath10k_10_2_peer_tx_stats { >> +u8 ratecode[PEER_STATS_FOR_NO_OF_PPDUS]; >> +u8 success_pkts[PEER_STATS_FOR_NO_OF_PPDUS]; >> +__le16 success_bytes[PEER_STATS_FOR_NO_OF_PPDUS]; >> +u8 retry_pkts[PEER_STATS_FOR_NO_OF_PPDUS]; >> +__le16

Re: [PATCH 2/2] ath10k: add per peer tx stats support for 10.2.4

2017-12-02 Thread Toke Høiland-Jørgensen
Johannes Berg <johan...@sipsolutions.net> writes: > On Fri, 2017-12-01 at 16:54 +0100, Toke Høiland-Jørgensen wrote: > >> But since we'll have to do that for ath9k anyway it >> becomes more a question of whether it's something that should be >> supported in mac80211

Re: [PATCH v2] ath10k: Re-enable TXQs for all devices

2017-11-12 Thread Toke Høiland-Jørgensen
Felix Fietkau <n...@nbd.name> writes: > On 2017-11-10 01:48, Toke Høiland-Jørgensen wrote: >> Commit 4ca1807815aa6801aaced7fdefa9edacc2521767 disables the use of the >> mac80211 TXQs for some devices because of a theoretical throughput >> regression. The original regre

RE: [Make-wifi-fast] [PATCH] ath10k: Re-enable TXQs for all devices

2017-11-09 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > Agree.. Even I am not fan of that patch in ath10k. IIRC Michal pushed > this change as temp one and planned to revert it once it is fixed in > stack or in driver. > > I thought Eric change in fq_codel is meant only for fatty udp flows. >

[PATCH v2] ath10k: Re-enable TXQs for all devices

2017-11-09 Thread Toke Høiland-Jørgensen
. Since then, we have not seen the TXQ-related regression, so it should be safe to re-enable TXQs. [1] http://lists.infradead.org/pipermail/ath10k/2016-April/007266.html Signed-off-by: Toke Høiland-Jørgensen <t...@toke.dk> --- This has been in LEDE trunk for a couple of months now with good r

Re: [PATCH 2/2] ath10k: add per peer tx stats support for 10.2.4

2017-12-01 Thread Toke Høiland-Jørgensen
ako...@codeaurora.org writes: > On 2017-11-30 22:08, Kalle Valo wrote: >> Toke Høiland-Jørgensen <t...@toke.dk> writes: >> >>>>> +struct ath10k_10_2_peer_tx_stats { >>>>> + u8 ratecode[PEER_STATS_FOR_NO_OF_PPDUS]; >>>>> + u8 succ

Re: [PATCH 2/2] ath10k: add per peer tx stats support for 10.2.4

2017-12-01 Thread Toke Høiland-Jørgensen
Johannes Berg <johan...@sipsolutions.net> writes: > On Fri, 2017-12-01 at 16:29 +0100, Toke Høiland-Jørgensen wrote: >> >> Yeah, figures. Well, maybe we'll just have to support an asynchronous >> callback into mac80211 to register airtime usage. Will probably have to

Re: [PATCH 2/2] ath10k: add per peer tx stats support for 10.2.4

2017-12-01 Thread Toke Høiland-Jørgensen
Kalle Valo writes: >>> tx_duration is aggregate time duration of 4 PPDU sent to STA. >>> FW sends these values for retry packets also. >> >> Great, that sounds like just what we need. > > Except mapping to the iee80211_tx_status() might be difficult. I'm not > sure how

Re: ath10k wake_tx_queue issues

2018-05-15 Thread Toke Høiland-Jørgensen
[ Adding Felix ] Niklas Cassel writes: > Hello mac80211 and ath10k people > > Using ath10k, TX stops working when running iperf > > [ 3] 0.0- 1.0 sec 2.00 MBytes 16.8 Mbits/sec > [ 3] 1.0- 2.0 sec 3.12 MBytes 26.2 Mbits/sec > [ 3] 2.0- 3.0 sec 3.25 MBytes

Re: ath10k wake_tx_queue issues

2018-05-16 Thread Toke Høiland-Jørgensen
Niklas Cassel writes: > [ .. snip .. ] >> > Sure, the regular way ath10k_mac_op_wake_tx_queue is called is via >> > ieee80211_subif_start_xmit => __ieee80211_subif_start_xmit => >> > ieee80211_xmit_fast >> > => ieee80211_queue_skb => drv_wake_tx_queue. >> > >> > But I

Re: [Make-wifi-fast] [PATCH] ath10k: Add independent prio sta queue

2018-01-08 Thread Toke Høiland-Jørgensen
> Using what I understand now, I using aid to select which txq will be > priority and sent out first. But when I testing this code with iperf, > it is not working as I think. 2 station both sending -b 400M -t 0 packet, > (maximum about 250M)I exepct the station I setup in param will take all the

Re: [PATCH 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-07-26 Thread Toke Høiland-Jørgensen
Wen Gong writes: > 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

Re: [PATCH 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-07-27 Thread Toke Høiland-Jørgensen
Wen Gong writes: > On 2018-07-26 19:45, Toke Høiland-Jørgensen wrote: >> Wen Gong writes: >> >>> Upstream kernel has an interface to help adjust sk_pacing_shift to >>> help >>> improve TCP UL throughput. >>> The sk_pacing_shift is 8 in mac8

RE: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-08-17 Thread Toke Høiland-Jørgensen
Wen Gong writes: >> -Original Message- >> From: Toke Høiland-Jørgensen >> Sent: Monday, August 13, 2018 7:18 PM >> To: Wen Gong ; Wen Gong >> ; ath10k@lists.infradead.org; >> johan...@sipsolutions.net >> Cc: linux-wirel...@vger.kernel.org

RE: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-08-13 Thread Toke Høiland-Jørgensen
Wen Gong writes: > Hi Toke, > > I have tested with your method for shift 6/8/10/7 all twice time in > open air environment. Great, thanks! > Shift 6: > wgong@wgong-Latitude-E5440-1:~/flent$ flent -H 192.168.1.7 -t > "sk_pacing_shift6" tcp_nup --test-parameter upload_streams=1 Just to be sure:

Re: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-08-08 Thread Toke Høiland-Jørgensen
Wen Gong writes: > 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

RE: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-08-10 Thread Toke Høiland-Jørgensen
Wen Gong writes: >> -Original Message- >> From: ath10k On Behalf Of Toke >> Høiland-Jørgensen >> Sent: Wednesday, August 8, 2018 6:44 PM >> To: Wen Gong ; ath10k@lists.infradead.org; >> johan...@sipsolutions.net >> Cc: linux-wirel...@vger.kernel

Re: [PATCH v2 0/2] Change sk_pacing_shift in ieee80211_hw for best tx throughput

2018-08-10 Thread Toke Høiland-Jørgensen
Arend van Spriel writes: > On 8/8/2018 9:00 PM, Peter Oh wrote: >> >> >> On 08/08/2018 03:40 AM, Wen Gong wrote: >>> Add a field for ath10k to adjust the sk_pacing_shift, mac80211 set >>> the default value to 8, and ath10k will change it to 6. Then mac80211 >>> will use the changed value 6 as

Re: [PATCH v2 0/2] Change sk_pacing_shift in ieee80211_hw for best tx throughput

2018-08-20 Thread Toke Høiland-Jørgensen
Arend van Spriel writes: > + Eric > > On 8/10/2018 9:52 PM, Ben Greear wrote: >> On 08/10/2018 12:28 PM, Arend van Spriel wrote: >>> On 8/10/2018 3:20 PM, Toke Høiland-Jørgensen wrote: >>>> Arend van Spriel writes: >>>> >>>>> On

RE: Setting tx retry count in ath10k

2018-07-18 Thread Toke Høiland-Jørgensen
Jean-Pierre TOSONI writes: > @Toke: As you can see in the patch, the value 30 was the fixed value > defined in ath9k, I kept it for compatibility only (and that's why I > wanted to make it configurable :-) Yup, I'm aware that this is the default from ath9k; doesn't make it any less wrong ;) >

Re: Setting tx retry count in ath10k

2018-07-18 Thread Toke Høiland-Jørgensen
Ben Greear writes: > On 07/18/2018 08:50 AM, Jean-Pierre TOSONI wrote: >> Hi, >> >> We made retries configurable in our mac80211+ath9k system, and we ended with >> 3 counts: >> 1) short retry count, defaults to 4 >> 2) long retrys count, defauts to 7 >> 3) software retry count, defaults to 30

Re: Setting tx retry count in ath10k

2018-07-19 Thread Toke Høiland-Jørgensen
Benjamin Beichler writes: >>> For general internet traffic, a retry count of 30 is way too high; that >>> is up to 120 ms of HOL blocking latency. Better to just drop the packet >>> at that point. >>> >>> Ideally, the retry count should be dynamically calculated in units of >>> time (which would

Re: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-09-06 Thread Toke Høiland-Jørgensen
Grant Grundler writes: >> And, well, Grant's data is from a single test in a noisy >> environment where the time series graph shows that throughput is all over >> the place for the duration of the test; so it's hard to draw solid >> conclusions from (for instance, for the 5-stream test, the

Re: [PATCH 0/6] Move TXQ scheduling and airtime fairness into mac80211

2018-10-21 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > Toke, > > It is been a while since mac80211 TXQ discussion started. Here is the > consolidated > series of mac80211, ath9k and ath10k changes to move TXQ scheduling and > airtime > fairness into mac80211. The major changes w.r.t 5th RFC version are in >

Re: [PATCH 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-10-26 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > From: Toke Høiland-Jørgensen > > This adds airtime accounting and scheduling to the mac80211 TXQ > scheduler. A new callback, ieee80211_sta_register_airtime(), is added > that drivers can call to report airtime usage for stations. > > Whe

Re: [PATCH 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-10-28 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > On 2018-10-26 07:16, Toke Høiland-Jørgensen wrote: >> Rajkumar Manoharan writes: >> >>> From: Toke Høiland-Jørgensen > [...] >>> u8 max_nan_de_entries; >>> u8 tx_sk_pacing_shift; >>> + u32 airtime_w

Re: [PATCH 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-11-02 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > On 2018-10-28 15:01, Rajkumar Manoharan wrote: >> On 2018-10-28 08:48, Toke Høiland-Jørgensen wrote: >>> Rajkumar Manoharan writes: >>> >>>> >>>> 4ms 223 (40%) 214 (40%)109 (10%) 94 (1

Re: [PATCH 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-11-08 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > On 2018-11-07 06:53, Toke Høiland-Jørgensen wrote: >> Rajkumar Manoharan writes: >> >>> Meanwhile we did some more experiments with both modes. The experiment >>> was done in open environment and fixed rate and UDP traffic ran f

Re: [Make-wifi-fast] [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-11-15 Thread Toke Høiland-Jørgensen
Louie Lu writes: > Hi Rajkumar, Toke, > > I found the series (v3,4/6) remove the debugfs remove reset station's > airtime method, and didn't added at here. > > Not sure how to help this kind of situation, do I need a separate > patch to fix this, or posting the patch here is fine? This is fine;

Re: [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-11-15 Thread Toke Høiland-Jørgensen
Felix Fietkau writes: > On 2018-11-14 18:40, Toke Høiland-Jørgensen wrote: >>> This part doesn't really make much sense to me, but maybe I'm >>> misunderstanding how the code works. >>> Let's assume we have a driver like ath9k or mt76, which tries to k

Re: [PATCH 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-11-07 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > On 2018-11-02 03:30, Toke Høiland-Jørgensen wrote: >> Rajkumar Manoharan writes: >> >>> On 2018-10-28 15:01, Rajkumar Manoharan wrote: >>>> On 2018-10-28 08:48, Toke Høiland-Jørgensen wrote: >>>>> Rajkumar Manoh

Re: [PATCH 1/6] mac80211: Add TXQ scheduling API

2018-11-09 Thread Toke Høiland-Jørgensen
On 9 November 2018 13:00:04 CET, Johannes Berg wrote: >On Sat, 2018-10-20 at 04:05 -0700, Rajkumar Manoharan wrote: >> >> + * @txq: pointer obtained from station or virtual interface, or from >> + * ieee80211_next_txq() > >nit: please just indent by a single tab for continuation,

Re: [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-11-14 Thread Toke Høiland-Jørgensen
Felix Fietkau writes: > On 2018-11-12 23:51, Rajkumar Manoharan wrote: >> From: Toke Høiland-Jørgensen >> >> This adds airtime accounting and scheduling to the mac80211 TXQ >> scheduler. A new callback, ieee80211_sta_register_airtime(), is added >> that drivers

Re: [RFC v2 1/2] ath10k: migrate to mac80211 txq scheduling

2018-09-29 Thread Toke Høiland-Jørgensen
ocessing > N frames per txq is removed. By adapting to mac80211 APIs, > ath10k will support mac80211 based airtime fairness algorithm. > > Signed-off-by: Toke Høiland-Jørgensen > Signed-off-by: Rajkumar Manoharan > --- > drivers/net/wireless/ath/ath10k/core.c | 2 - > dr

Re: [RFC v2 1/2] ath10k: migrate to mac80211 txq scheduling

2018-10-02 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > On 2018-09-29 03:06, Toke Høiland-Jørgensen wrote: >> Rajkumar Manoharan writes: >> >>> - ath10k_htt_tx_txq_update(hw, f_txq); >>> + if (ret == -EBUSY) { >>> + ieee80211_txq_schedule_start(hw, ac); &g

Re: [RFC v2] ath10k: report tx rate using ieee80211_tx_status()

2018-09-03 Thread Toke Høiland-Jørgensen
Anilkumar Kolli writes: > On 2018-08-31 19:52, Toke Høiland-Jørgensen wrote: >> Kalle Valo writes: >> >>> Anilkumar Kolli writes: >>> >>>> Mesh path metric needs txrate information from ieee80211_tx_status() >>>> call but in ath10k

Re: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-08-31 Thread Toke Høiland-Jørgensen
Peter Oh writes: > Hi Toke, > > > On 08/17/2018 04:32 AM, Toke Høiland-Jørgensen wrote: >> >>>>> Shift 6: >>>>> wgong@wgong-Latitude-E5440-1:~/flent$ flent -H 192.168.1.7 -t >>>>> "sk_pacing_shift6" tcp_nup --test-paramete

Re: [RFC v2] ath10k: report tx rate using ieee80211_tx_status()

2018-08-31 Thread Toke Høiland-Jørgensen
Kalle Valo writes: > Anilkumar Kolli writes: > >> Mesh path metric needs txrate information from ieee80211_tx_status() >> call but in ath10k there is no mechanism to report tx rate information >> via ieee80211_tx_status(), the rate is only accessible via >> sta_statiscs() op. >> >> Per peer

Re: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-09-03 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Thu, 2018-08-30 at 16:32 -0700, Grant Grundler wrote: >> On Sun, Aug 12, 2018 at 10:37 PM Wen Gong wrote: >> ... >> > I have tested with your method for shift 6/8/10/7 all twice time in open >> > air environment. >> >> I've attached the graphed data which Wen

Re: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2018-09-03 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Mon, 2018-09-03 at 13:11 +0200, Toke Høiland-Jørgensen wrote: > >> > 6 vs. 8, I think? But I didn't follow the full discussion. > > Err, I just realized that I was completely wrong - the default, of > course, is 10. So smaller values mean more b

Re: [RFCv3 1/2] mac80211: implement ieee80211_tx_rate_update to update rate

2018-09-21 Thread Toke Høiland-Jørgensen
Anilkumar Kolli writes: > On 2018-09-20 21:40, Toke Høiland-Jørgensen wrote: >> Anilkumar Kolli writes: >> >>> Current mac80211 has provision to update tx status through >>> ieee80211_tx_status() and ieee80211_tx_status_ext(). But >>> drivers like

Re: [RFCv3 1/2] mac80211: implement ieee80211_tx_rate_update to update rate

2018-09-20 Thread Toke Høiland-Jørgensen
Anilkumar Kolli writes: > Current mac80211 has provision to update tx status through > ieee80211_tx_status() and ieee80211_tx_status_ext(). But > drivers like ath10k updates the tx status from the skb except > txrate, txrate will be updated from a different path, peer stats. > > Using

Re: [RFC 2/2] ath10k: reporting estimated tx airtime for fairness

2018-09-28 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > Transmit airtime will be estimated from last tx rate used. > Firmware report tx rate by peer stats. Airtime is computed > on tx path and the same will be reported to mac80211 upon > tx completion. > > Signed-off-by: Kan Yan > Signed-off-by: Rajkumar Manoharan > ---

Re: [PATCH v5 4/6] ath9k: Switch to mac80211 TXQ scheduling and airtime APIs

2019-01-21 Thread Toke Høiland-Jørgensen
Just discovered this while working on my follow-up: > void ath_tx_queue_tid(struct ath_softc *sc, struct ath_atx_tid *tid) > { > - struct ath_vif *avp = (struct ath_vif *) tid->an->vif->drv_priv; > - struct ath_chanctx *ctx = avp->chanctx; > - struct ath_acq *acq; > + struct

Re: [PATCH v4 6/6] ath10k: reporting estimated tx airtime for fairness

2019-01-21 Thread Toke Høiland-Jørgensen
Toke Høiland-Jørgensen writes: > Rajkumar Manoharan writes: > >> From: Kan Yan >> >> Transmit airtime will be estimated from last tx rate used. >> Firmware report tx rate by peer stats. Airtime is computed >> on tx path and the same will be reported to mac

[PATCH v6 0/4] Switch ath9k and ath10k to mac80211 airtime framework

2019-01-22 Thread Toke Høiland-Jørgensen
ieee80211_return_txq() without proper logging. Kan Yan (1): ath10k: reporting estimated tx airtime for fairness Toke Høiland-Jørgensen (3): mac80211: Expose ieee80211_schedule_txq() function ath9k: Switch to mac80211 TXQ scheduling and airtime APIs ath10k: migrate to mac80211 txq scheduling

[PATCH v6 4/4] ath10k: reporting estimated tx airtime for fairness

2019-01-22 Thread Toke Høiland-Jørgensen
he airtime computation] Signed-off-by: Rajkumar Manoharan [t...@redhat.com: Rebase to mac80211-next, add test note] Signed-off-by: Toke Høiland-Jørgensen --- Rajkumar / Kan: Please check that I didn't mess anything up while rebasing this onto the current mac80211-next branch! drivers/net/wireless/ath/ath

[PATCH v6 2/4] ath9k: Switch to mac80211 TXQ scheduling and airtime APIs

2019-01-22 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen This moves the ath9k driver to use the mac80211 TXQ scheduling and airtime accounting APIs, removing the corresponding state tracking inside the driver. Signed-off-by: Toke Høiland-Jørgensen [rmano...@codeaurora.org: fixed checkpatch error and warnings] Signed-off

[PATCH v6 3/4] ath10k: migrate to mac80211 txq scheduling

2019-01-22 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen ath10k maintains common txqs list for all stations. This txq management can be removed by migrating to mac80211 txq APIs and let mac80211 handle txqs reordering based on reported airtime. By doing this, txq fairness maintained in ath10k i.e processing N frames per

Re: [PATCH v7 1/4] mac80211: Expose ieee80211_schedule_txq() function

2019-01-22 Thread Toke Høiland-Jørgensen
Toke Høiland-Jørgensen writes: > Since we reworked ieee80211_return_txq() so it assumes that the caller > takes care of logging, we need another function that can be called without > holding any locks. Introduce ieee80211_schedule_txq() which serves this > purpose. Hmm, messed up

Re: [Make-wifi-fast] [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-12-18 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Thu, 2018-11-15 at 09:10 -0800, Toke Høiland-Jørgensen wrote: >> Louie Lu writes: >> >> > Hi Rajkumar, Toke, >> > >> > I found the series (v3,4/6) remove the debugfs remove reset station's >> > airtime method

Re: [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-12-04 Thread Toke Høiland-Jørgensen
Felix Fietkau writes: >> diff --git a/net/mac80211/status.c b/net/mac80211/status.c >> index aa4afbf0abaf..a1f1256448f5 100644 >> --- a/net/mac80211/status.c >> +++ b/net/mac80211/status.c >> @@ -818,6 +818,12 @@ static void __ieee80211_tx_status(struct ieee80211_hw >> *hw, >>

Re: [Make-wifi-fast] [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-11-19 Thread Toke Høiland-Jørgensen
Dave Taht writes: > Toke Høiland-Jørgensen writes: > >> Felix Fietkau writes: >> >>> On 2018-11-14 18:40, Toke Høiland-Jørgensen wrote: >>>>> This part doesn't really make much sense to me, but maybe I'm >>>>> misunderstanding how the c

Re: [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs

2018-11-19 Thread Toke Høiland-Jørgensen
Hi Felix Thinking a bit more about this, I think that rather than having the driver work around the API as in your example... > do { > struct ieee80211_txq *pending_txq[4]; > int n_pending_txq = 0; > int i; > > if (hwq->pending < 4) > break;p > >

Re: [PATCH v5 0/6] Move TXQ scheduling and airtime fairness into mac80211

2018-12-19 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > All, > > Sorry for the long delay. Here is the consolidated series of mac80211, > ath9k and ath10k changes for moving TXQ scheduling and airtime fairness > into mac80211 and support airtime fairness. Thanks for taking care of the respin! Johannes, I think it's safe

Re: [PATCH] ath10k: remove iteration in wake_tx_queue

2019-04-01 Thread Toke Høiland-Jørgensen
Erik Stromdahl writes: > Iterating the TX queue and thereby dequeuing all available packets in the > queue could result in performance penalties on some SMP systems. > > The reason for this is most likely that the per-ac lock (active_txq_lock) > in mac80211 will be held by the CPU iterating the

Re: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2019-02-21 Thread Toke Høiland-Jørgensen
Ben Greear writes: > On 2/21/19 8:37 AM, Toke Høiland-Jørgensen wrote: >> Ben Greear writes: >> >>> On 2/21/19 8:10 AM, Kalle Valo wrote: >>>> Toke Høiland-Jørgensen writes: >>>> >>>>> Grant Grundler writes: >>>>&g

[PATCH] mac80211: Change default tx_sk_pacing_shift to 7

2019-02-21 Thread Toke Høiland-Jørgensen
and overrides needed in the drivers. Signed-off-by: Toke Høiland-Jørgensen --- net/mac80211/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 5055aeba5c5a..800e67615e2a 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c

Re: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2019-02-21 Thread Toke Høiland-Jørgensen
Ben Greear writes: > On 2/21/19 8:10 AM, Kalle Valo wrote: >> Toke Høiland-Jørgensen writes: >> >>> Grant Grundler writes: >>> >>>> On Thu, Sep 6, 2018 at 3:18 AM Toke Høiland-Jørgensen wrote: >>>>> >>>>> Grant Gr

Re: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2019-02-21 Thread Toke Høiland-Jørgensen
Grant Grundler writes: > On Thu, Sep 6, 2018 at 3:18 AM Toke Høiland-Jørgensen wrote: >> >> Grant Grundler writes: >> >> >> And, well, Grant's data is from a single test in a noisy >> >> environment where the time series graph shows that throughput

Re: [PATCH] mac80211: Change default tx_sk_pacing_shift to 7

2019-02-22 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > Toke Høiland-Jørgensen wrote: > >> When we did the original tests for the optimal value of sk_pacing_shift, we >> came up with 6 ms of buffering as the default. Sadly, 6 is not a power of >> two, so when picking the shift value I erred on th

Re: [PATCH] mac80211: Change default tx_sk_pacing_shift to 7

2019-02-22 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Fri, 2019-02-22 at 14:06 +0100, Toke Høiland-Jørgensen wrote: >> Johannes Berg writes: >> >> > Toke Høiland-Jørgensen wrote: >> > >> > > When we did the original tests for the optimal value of sk_pacing_shift, &g

Re: [PATCH v2 2/2] ath10k: Set sk_pacing_shift to 6 for 11AC WiFi chips

2019-02-21 Thread Toke Høiland-Jørgensen
Ben Greear writes: > On 2/21/19 9:15 AM, Toke Høiland-Jørgensen wrote: >> Ben Greear writes: >> >>> On 2/21/19 8:37 AM, Toke Høiland-Jørgensen wrote: >>>> Ben Greear writes: >>>> >>>>> On 2/21/19 8:10 AM, Kalle Valo wrote: >&

Re: [PATCH] mac80211: Change default tx_sk_pacing_shift to 7

2019-02-23 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Fri, 2019-02-22 at 14:40 +0100, Toke Høiland-Jørgensen wrote: >> >> And send it directly to stable, or does it need to go through you? > > I added a Cc: stable tag. So all you really need to do is wait for the > emails telling you it fai

Re: [PATCH v6 4/4] ath10k: reporting estimated tx airtime for fairness

2019-01-25 Thread Toke Høiland-Jørgensen
Kan Yan writes: > Hi Toke, > > This patch looks good to me. Great job on getting the airtime fairness > scheduling framework done! Great, thanks for checking! Have another patch to test on top of this series, then we should look into getting the airtime queue limit patch into mac80211 as well

Re: [PATCH v7 1/4] mac80211: Expose ieee80211_schedule_txq() function

2019-01-25 Thread Toke Høiland-Jørgensen
Johannes Berg writes: >> +void ieee80211_schedule_txq(struct ieee80211_hw *hw, >> +struct ieee80211_txq *txq) >> +__acquires(txq_lock) __releases(txq_lock) >> +{ >> +struct ieee80211_local *local = hw_to_local(hw); >> +struct txq_info *txqi = to_txq_info(txq);

Re: [PATCH] ath10k: remove iteration in wake_tx_queue

2019-04-16 Thread Toke Høiland-Jørgensen
Erik Stromdahl writes: > On 4/1/19 1:05 PM, Toke Høiland-Jørgensen wrote: >> Erik Stromdahl writes: >> >>> Iterating the TX queue and thereby dequeuing all available packets in the >>> queue could result in performance penalties on some SMP systems. >>&

Re: [PATCH v2] ath10k: fix different tx duration output

2019-04-17 Thread Toke Høiland-Jørgensen
Lei Wang writes: > TX duration output of tx_stats in debugfs and station dump had big > difference because they got tx duration value from different statistic > data. We should use the same statistic data. So are you sure you picked the most accurate one of the two? :) -Toke

Re: [PATCH v2] ath10k: fix different tx duration output

2019-05-07 Thread Toke Høiland-Jørgensen
le...@codeaurora.org writes: > On 2019-04-18 16:07, Toke Høiland-Jørgensen wrote: >> le...@codeaurora.org writes: >> >>> On 2019-04-17 17:26, Toke Høiland-Jørgensen wrote: >>>> Lei Wang writes: >>>> >>>>> TX duration output o

Re: [PATCH] mac80211: Fix kernel panic due to use of txq after free

2019-04-16 Thread Toke Høiland-Jørgensen
list, result was kernel panic > due to invalid memory access. > > Fix kernel invalid memory access by properly removing txq object > from active_txqs list before free the object. > > Signed-off-by: Bhagavathi Perumal S Nice catch, thanks! Acked-by: Toke Høiland-Jørgensen This sh

RE: [PATCH 4/7] ath10k: disable TX complete indication of htt for sdio

2019-08-22 Thread Toke Høiland-Jørgensen
Wen Gong writes: >> -Original Message- >> From: Toke Høiland-Jørgensen >> Sent: Wednesday, August 21, 2019 6:10 PM >> To: Wen Gong ; Wen Gong >> ; ath10k@lists.infradead.org >> Cc: linux-wirel...@vger.kernel.org >> Subject: [EXT] RE: [PATCH 4

Re: [PATCH 2/7] ath10k: change max RX bundle size from 8 to 32 for sdio

2019-08-20 Thread Toke Høiland-Jørgensen
Wen Gong writes: > The max bundle size support by firmware is 32, change it from 8 to 32 > will help performance. This results in significant performance > improvement on RX path. What happens when the hardware doesn't have enough data to fill a bundle? Does it send a smaller one, or does it

Re: [PATCH 4/7] ath10k: disable TX complete indication of htt for sdio

2019-08-20 Thread Toke Høiland-Jørgensen
Wen Gong writes: > Tx complete message from firmware cost bus bandwidth of sdio, and bus > bandwidth is the bollteneck of throughput, it will effect the bandwidth > occupancy of data packet of TX and RX. > > This patch disable TX complete indication from firmware for htt data > packet, it

RE: [PATCH 2/7] ath10k: change max RX bundle size from 8 to 32 for sdio

2019-08-21 Thread Toke Høiland-Jørgensen
Wen Gong writes: >> -Original Message- >> From: ath10k On Behalf Of Toke >> Høiland-Jørgensen >> Sent: Tuesday, August 20, 2019 8:23 PM >> To: Wen Gong ; ath10k@lists.infradead.org >> Cc: linux-wirel...@vger.kernel.org >> Subject: [EXT] Re: [PA

RE: [PATCH 4/7] ath10k: disable TX complete indication of htt for sdio

2019-08-21 Thread Toke Høiland-Jørgensen
Wen Gong writes: >> -Original Message- >> From: ath10k On Behalf Of Toke >> Høiland-Jørgensen >> Sent: Tuesday, August 20, 2019 8:24 PM >> To: Wen Gong ; ath10k@lists.infradead.org >> Cc: linux-wirel...@vger.kernel.org >> Subject: [EXT] R

RE: [PATCH 4/7] ath10k: disable TX complete indication of htt for sdio

2019-08-23 Thread Toke Høiland-Jørgensen
Wen Gong writes: >> -Original Message- >> From: Toke Høiland-Jørgensen >> Sent: Thursday, August 22, 2019 8:12 PM >> To: Wen Gong ; Wen Gong >> ; ath10k@lists.infradead.org >> Cc: linux-wirel...@vger.kernel.org >> Subject: [EXT] RE: [PATCH 4

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-17 Thread Toke Høiland-Jørgensen
us, defering the > removal right before the end of this schedule round. > > Co-developed-by: Yibo Zhao > Signed-off-by: Yibo Zhao > Signed-off-by: Toke Høiland-Jørgensen I didn't write this patch, so please don't use my sign-off. I'll add ack or review tags as appropriate in repl

Re: [PATCH 1/4] mac80211: Switch to a virtual time-based airtime scheduler

2019-09-17 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > From: Toke Høiland-Jørgensen > > This switches the airtime scheduler in mac80211 to use a virtual time-based > scheduler instead of the round-robin scheduler used before. This has a > couple of advantages: > > - No need to sync up the round-robin

Re: [PATCH 4/4] mac80211: Sync airtime weight sum with per AC synced sta airtime weight together

2019-09-17 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > Global airtime weight sum is updated only when txq is added/removed > from rbtree. If upper layer configures sta weight during high load, > airtime weight sum will not be updated since txq is most likely on the > tree. It could a little late for upper layer to reconfigure sta

Re: [PATCH 3/4] mac80211: fix low throughput in push pull mode

2019-09-17 Thread Toke Høiland-Jørgensen
uot;firmware"? These >> things are not something mac80211 knows about. > Hi Johannes, > > Thanks for your kindly reminder. Will rewrite the commit log. > >> >>> Co-developed-by: Yibo Zhao >> >> That also seems wrong, should be Toke I guess, unle

Re: [PATCH 3/4] mac80211: fix low throughput in push pull mode

2019-09-18 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-09-18 05:12, Toke Høiland-Jørgensen wrote: >> Yibo Zhao writes: >> >>> On 2019-09-16 23:27, Johannes Berg wrote: >>>> Without really looking at the code - >>>> >>>>> If station is ineligible for tran

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-18 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-09-18 05:10, Toke Høiland-Jørgensen wrote: >> Yibo Zhao writes: >> >>> In a loop txqs dequeue scenario, if the first txq in the rbtree gets >>> removed from rbtree immediately in the ieee80211_return_txq(), the >>> loop

Re: [PATCH 1/4] mac80211: Switch to a virtual time-based airtime scheduler

2019-09-17 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > From: Toke Høiland-Jørgensen > > This switches the airtime scheduler in mac80211 to use a virtual time-based > scheduler instead of the round-robin scheduler used before. This has a > couple of advantages: Thank you for keeping at this! I'll take a loo

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-21 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-09-20 17:15, Toke Høiland-Jørgensen wrote: >> Yibo Zhao writes: >> >>> On 2019-09-19 18:37, Toke Høiland-Jørgensen wrote: >>>> Yibo Zhao writes: >>>> >>>>> On 2019-09-18 19:23, Toke Høiland-Jørgensen

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-21 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-09-21 19:27, Toke Høiland-Jørgensen wrote: >> Yibo Zhao writes: >> >>> On 2019-09-20 17:15, Toke Høiland-Jørgensen wrote: >>>> Yibo Zhao writes: >>>> >>>>> On 2019-09-19 18:37, Toke Høiland-Jørgensen

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-21 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-09-21 21:02, Toke Høiland-Jørgensen wrote: >> Yibo Zhao writes: >> >>> On 2019-09-21 19:27, Toke Høiland-Jørgensen wrote: >>>> Yibo Zhao writes: >>>> >>>>> On 2019-09-20 17:15, Toke Høiland-Jørgensen

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-19 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-09-18 19:23, Toke Høiland-Jørgensen wrote: >> Yibo Zhao writes: >> >>> On 2019-09-18 05:10, Toke Høiland-Jørgensen wrote: >>>> Yibo Zhao writes: >>>> >>>>> In a loop txqs dequeue scenario, if the fir

Re: [PATCH V3 0/4] Enable virtual time-based airtime scheduler support on ath10k

2019-10-01 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-10-01 18:19, Johannes Berg wrote: >> On Mon, 2019-09-23 at 15:19 +0800, Yibo Zhao wrote: >>> This series fix some issues when enabling virtual time-based airtime >>> scheduler on ath10k. >>> >> Given the lengthy discussion here and also over in the related thread >>

Re: [PATCH] mac80211: fix txq null pointer dereference

2019-09-27 Thread Toke Høiland-Jørgensen
a0 [mac80211] > [] ieee80211_if_read+0x60/0xbc [mac80211] > [] ieee80211_if_read_aqm+0x28/0x30 [mac80211] > [] full_proxy_read+0x2c/0x48 > [] __vfs_read+0x2c/0xd4 > [] vfs_read+0x8c/0x108 > [] SyS_read+0x40/0x7c > > Tested HW: QCA9984 > Tested FW: 10.4-3.10-00047 > > Signed-off-by: Miaoqing Pan Acked-by: Toke Høiland-Jørgensen

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-23 Thread Toke Høiland-Jørgensen
Kalle Valo writes: > Toke Høiland-Jørgensen writes: > >> Yibo Zhao writes: >> >>> On 2019-09-21 22:00, Toke Høiland-Jørgensen wrote: >>>> Yibo Zhao writes: >>>> >>>>> On 2019-09-21 21:02, Toke Høiland-Jørgensen wrote: &

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-24 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-09-24 15:26, Toke Høiland-Jørgensen wrote: >>>> Hmm, yeah, I guess we could end up with a loop like that as well. >>>> Keeping the schedule_round would be a way to fix it, but I'm not sure >>>> we >>>> should just sk

Re: [PATCH V3 3/4] mac80211: fix low throughput in multi-clients situation

2019-09-24 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: >> I can see why we need the second part (basically, this happens because >> I >> forgot to add a check for "no eligible stations" in may_transmit(), >> like >> the one in next_txq()). And rounding up the division result doesn't >> hurt, I guess. But why does it help to

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-24 Thread Toke Høiland-Jørgensen
Kalle Valo writes: > Toke Høiland-Jørgensen writes: > >> Kalle Valo writes: >> >>> Toke Høiland-Jørgensen writes: >>> >>>> Yibo Zhao writes: >>>> >>>>> On 2019-09-21 22:00, Toke Høiland-Jørgensen wrote: >>&g

Re: [PATCH V3 4/4] mac80211: Sync airtime weight sum with per AC synced sta airtime weight together

2019-09-24 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-09-23 19:00, Toke Høiland-Jørgensen wrote: > >>> - if (params->airtime_weight) >>> - sta->airtime_weight = params->airtime_weight; >>> + if (params->airtime_weight && >>> + params->a

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-24 Thread Toke Høiland-Jørgensen
>> Hmm, yeah, I guess we could end up with a loop like that as well. >> Keeping the schedule_round would be a way to fix it, but I'm not sure >> we >> should just skip that station; maybe we should just end the round >> instead? > I am not sure. I believe, in some cases, the rest of the nodes

Re: [PATCH V3 4/4] mac80211: Sync airtime weight sum with per AC synced sta airtime weight together

2019-09-23 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > Global airtime weight sum is updated only when txq is added/removed > from rbtree. If upper layer configures sta weight during high load, > airtime weight sum will not be updated since txq is most likely on the > tree. It could a little late for upper layer to reconfigure sta

Re: [PATCH 2/4] mac80211: defer txqs removal from rbtree

2019-09-20 Thread Toke Høiland-Jørgensen
Yibo Zhao writes: > On 2019-09-19 18:37, Toke Høiland-Jørgensen wrote: >> Yibo Zhao writes: >> >>> On 2019-09-18 19:23, Toke Høiland-Jørgensen wrote: >>>> Yibo Zhao writes: >>>> >>>>> On 2019-09-18 05:10, Toke Høiland-Jørgensen

[PATCH v7] mac80211: Import airtime calculation code from mt76

2019-11-11 Thread Toke Høiland-Jørgensen
be used directly for the AQL calculations later. Signed-off-by: Toke Høiland-Jørgensen --- I realised this patch was fairly self-contained, so I thought I would just go ahead and send it on its own instead of waiting for Kan to update his patch. Someone *please* check my math oh the HE mode stuff

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-09 Thread Toke Høiland-Jørgensen
Kan Yan writes: > It is most likely just insufficient locking. active_txq_lock is per > AC, can't protect local->aql_total_pending_airtime against racing > conditions: > void ieee80211_sta_update_pending_airtime(...) > { > spin_lock_bh(>active_txq_lock[ac]); > ... >

  1   2   >