mbox series

[00/12] mt76usb: some cleanups and optimizations

Message ID 20190321152537.19105-1-sgruszka@redhat.com (mailing list archive)
Headers show
Series mt76usb: some cleanups and optimizations | expand

Message

Stanislaw Gruszka March 21, 2019, 3:25 p.m. UTC
Significant change is remove mt76u_buf and use urb directly
and allocate urb and sg as linear data for better cache usage.
Other that that, set consist only of some minor cleanups.

RFC -> v1:
- introduce mt76u_tx_setup_buffers
- calculate data_len differently
- fix *usb->sg bug on intermediate patches
- use (struct scatterlist *)(e->urb + 1) trick

Rebased on latest tree and 
[PATCH v2 00/12] mt76x02: AP support for USB with PS
https://lore.kernel.org/linux-wireless/1552991867-5087-1-git-send-email-sgruszka@redhat.com/
  
Not rebased on
[PATCH 1/6] mt76: use mac80211 txq scheduling
https://lore.kernel.org/linux-wireless/20190316204242.73560-1-nbd@nbd.name/
It easer to rebase '[PATCH 5/6] mt76: move tx tasklet to struct mt76_dev'
from that set of top of my 2 pending sets. 

Stanislaw Gruszka (12):
  mt76usb: change mt76u_submit_buf
  mt76: remove rx_page_lock
  mt76usb: change mt76u_fill_rx_sg arguments
  mt76usb: use usb_dev private data
  mt76usb: remove mt76u_buf redundant fileds
  mt76usb: move mt76u_buf->done to queue entry
  mt76usb: remove mt76u_buf and use urb directly
  mt76usb: remove MT_RXQ_MAIN queue from mt76u_urb_alloc
  mt76usb: resue mt76u_urb_alloc for tx
  mt76usb: remove unneded sg_init_table
  mt76usb: allocate urb and sg as linear data
  mt76usb: remove queue variable from rx_tasklet

 drivers/net/wireless/mediatek/mt76/mt76.h     |  15 +-
 .../net/wireless/mediatek/mt76/mt76x0/usb.c   |   2 +-
 .../net/wireless/mediatek/mt76/mt76x2/usb.c   |   4 +-
 drivers/net/wireless/mediatek/mt76/usb.c      | 243 ++++++++----------
 4 files changed, 118 insertions(+), 146 deletions(-)

Comments

Lorenzo Bianconi March 22, 2019, 11:02 a.m. UTC | #1
> Significant change is remove mt76u_buf and use urb directly
> and allocate urb and sg as linear data for better cache usage.
> Other that that, set consist only of some minor cleanups.
> 
> RFC -> v1:
> - introduce mt76u_tx_setup_buffers
> - calculate data_len differently
> - fix *usb->sg bug on intermediate patches
> - use (struct scatterlist *)(e->urb + 1) trick
> 
> Rebased on latest tree and 
> [PATCH v2 00/12] mt76x02: AP support for USB with PS
> https://lore.kernel.org/linux-wireless/1552991867-5087-1-git-send-email-sgruszka@redhat.com/
>   
> Not rebased on
> [PATCH 1/6] mt76: use mac80211 txq scheduling
> https://lore.kernel.org/linux-wireless/20190316204242.73560-1-nbd@nbd.name/
> It easer to rebase '[PATCH 5/6] mt76: move tx tasklet to struct mt76_dev'
> from that set of top of my 2 pending sets. 

LGTM

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

> 
> Stanislaw Gruszka (12):
>   mt76usb: change mt76u_submit_buf
>   mt76: remove rx_page_lock
>   mt76usb: change mt76u_fill_rx_sg arguments
>   mt76usb: use usb_dev private data
>   mt76usb: remove mt76u_buf redundant fileds
>   mt76usb: move mt76u_buf->done to queue entry
>   mt76usb: remove mt76u_buf and use urb directly
>   mt76usb: remove MT_RXQ_MAIN queue from mt76u_urb_alloc
>   mt76usb: resue mt76u_urb_alloc for tx
>   mt76usb: remove unneded sg_init_table
>   mt76usb: allocate urb and sg as linear data
>   mt76usb: remove queue variable from rx_tasklet
> 
>  drivers/net/wireless/mediatek/mt76/mt76.h     |  15 +-
>  .../net/wireless/mediatek/mt76/mt76x0/usb.c   |   2 +-
>  .../net/wireless/mediatek/mt76/mt76x2/usb.c   |   4 +-
>  drivers/net/wireless/mediatek/mt76/usb.c      | 243 ++++++++----------
>  4 files changed, 118 insertions(+), 146 deletions(-)
> 
> -- 
> 2.20.1
>
Felix Fietkau March 24, 2019, 7:25 a.m. UTC | #2
On 2019-03-21 16:25, Stanislaw Gruszka wrote:
> Significant change is remove mt76u_buf and use urb directly
> and allocate urb and sg as linear data for better cache usage.
> Other that that, set consist only of some minor cleanups.
> 
> RFC -> v1:
> - introduce mt76u_tx_setup_buffers
> - calculate data_len differently
> - fix *usb->sg bug on intermediate patches
> - use (struct scatterlist *)(e->urb + 1) trick
> 
> Rebased on latest tree and 
> [PATCH v2 00/12] mt76x02: AP support for USB with PS
> https://lore.kernel.org/linux-wireless/1552991867-5087-1-git-send-email-sgruszka@redhat.com/
>   
> Not rebased on
> [PATCH 1/6] mt76: use mac80211 txq scheduling
> https://lore.kernel.org/linux-wireless/20190316204242.73560-1-nbd@nbd.name/
> It easer to rebase '[PATCH 5/6] mt76: move tx tasklet to struct mt76_dev'
> from that set of top of my 2 pending sets. 
Applied, thanks.

- Felix