mbox series

[0/2] remove qid dependency from mt76-core code

Message ID cover.1550336347.git.lorenzo@kernel.org (mailing list archive)
Headers show
Series remove qid dependency from mt76-core code | expand

Message

Lorenzo Bianconi Feb. 16, 2019, 5:47 p.m. UTC
From: Lorenzo Bianconi <lorenzo@kernel.org>

Move queue id dependency in driver specific tx queue initialization code
since new chipsets rely on a different tx queue enumeration scheme.
Add the possibility to specify qid in mt76_tx routine

Lorenzo Bianconi (2):
  mt76: add qid parameter to mt76_tx signature
  mt76: move txq qid dependency in driver specific code

 drivers/net/wireless/mediatek/mt76/mac80211.c | 27 +++++++++++-------
 drivers/net/wireless/mediatek/mt76/mt76.h     | 14 ++++++++--
 .../net/wireless/mediatek/mt76/mt76x02_txrx.c |  8 +++++-
 .../net/wireless/mediatek/mt76/mt76x02_util.c |  2 ++
 drivers/net/wireless/mediatek/mt76/tx.c       | 28 +++++--------------
 5 files changed, 45 insertions(+), 34 deletions(-)

Comments

Ryder Lee Feb. 18, 2019, 2:32 a.m. UTC | #1
On Sat, 2019-02-16 at 18:47 +0100, lorenzo@kernel.org wrote:
> From: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> Move queue id dependency in driver specific tx queue initialization code
> since new chipsets rely on a different tx queue enumeration scheme.
> Add the possibility to specify qid in mt76_tx routine
> 
> Lorenzo Bianconi (2):
>   mt76: add qid parameter to mt76_tx signature
>   mt76: move txq qid dependency in driver specific code
> 
>  drivers/net/wireless/mediatek/mt76/mac80211.c | 27 +++++++++++-------
>  drivers/net/wireless/mediatek/mt76/mt76.h     | 14 ++++++++--
>  .../net/wireless/mediatek/mt76/mt76x02_txrx.c |  8 +++++-
>  .../net/wireless/mediatek/mt76/mt76x02_util.c |  2 ++
>  drivers/net/wireless/mediatek/mt76/tx.c       | 28 +++++--------------
>  5 files changed, 45 insertions(+), 34 deletions(-)
> 

Thanks. This will help us to develop the new chipsets more easily.

Acked-by: Ryder Lee <ryder.lee@mediatek.com>
Felix Fietkau Feb. 18, 2019, 6:29 p.m. UTC | #2
On 2019-02-16 18:47, lorenzo@kernel.org wrote:
> From: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> Move queue id dependency in driver specific tx queue initialization code
> since new chipsets rely on a different tx queue enumeration scheme.
> Add the possibility to specify qid in mt76_tx routine
I've thought about this patch set some more, and I think we should take
a different approach.
If we simply map everything to the BE queue for MT7615, this breaks
per-AC scheduling of intermediate tx queues. Because outstanding packet
batches are currently tracked as part of the hardware queue, we can't
track them separately per AC in that case.

I would suggest the following approach instead.
- add a pointer to struct mt76_queue to make it possible to set a parent
queue
- add a queue identifier to struct mt76_queue_entry
- initialize only QID_AC_BE as a full hardware queue
- point all other data queues to QID_AC_BE
- use swq and swq_queued from the skb queue, all other fields (including
the lock) from the parent queue

Does that make sense?

- Felix