linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Felix Fietkau <nbd@nbd.name>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	lorenzo@kernel.org
Subject: Re: [PATCH 0/4] do not use sg if not properly supported by usb controller
Date: Wed, 13 Feb 2019 12:00:42 +0100	[thread overview]
Message-ID: <20190213110041.GI6376@localhost.localdomain> (raw)
In-Reply-To: <20190213094449.GA5749@redhat.com>

On Feb 13, Stanislaw Gruszka wrote:
> On Tue, Feb 12, 2019 at 11:09:03PM +0100, Lorenzo Bianconi wrote:
> > > > On Tue, Feb 12, 2019 at 04:08:37PM +0100, Lorenzo Bianconi wrote:
> > > > > > > > What unnecessary operation ?
> > > > > > > 
> > > > > > > the ones in mt76u_fill_bulk_urb()
> > > > > > 
> > > > > > Your patches also add extra operations on hotpath due to urb->num_sgs and
> > > > > > dev->usb.sg_en checks.
> > > > > 
> > > > > here I guess you should use mt76u_check_sg() instead of
> > > > > udev->bus->sg_tablesize > 0 so I think you need to precompute it since it is in
> > > > > the hotpath
> > > > 
> > > > It's not necessary. If udev->bus->sg_tablesize > 0 is true and rest
> > > > of mt76u_check_sg() is not, we will submit urb with urb->num_sgs = 1 to
> > > > usb host driver, what is fine. 
> > > > 
> > > > > Moreover the RFC series has been tested by multiple users and on multiple
> > > > > devices
> > > > 
> > > > I know. Perhaps you could test my patch on rpi ?
> > > 
> > > sure, I will do it later
> > 
> > I confirm that even with Stanislaw's patch the usb dongle is properly working
> > on rpi3+
> 
> Thanks for testing. Would be ok to you to post my patch against
> wireless-drivers tree and cc stable as fix for non-SG usb hosts,
> drop your set for -next and work for fix for SG issue on AMD IOMMU?

I agree that your patch works (since it does not use SG I/O :)) but
I think it is more clear (and manageable) to have two separated
routines for memory allocation.
Moreover I think that this check has to be done in the control plane instead
of the data plane, so I would like to spend some more time in order to see if it is
possible to remove some checks in the hot-path

Regards,
Lorenzo

> 
> Stanislaw

  reply	other threads:[~2019-02-13 11:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 13:42 [PATCH RESEND 0/4] do not use sg if not properly supported by usb controller lorenzo
2019-02-12 13:42 ` [PATCH RESEND 1/4] mt76: usb: move mt76u_check_sg in usb.c lorenzo
2019-02-12 13:42 ` [PATCH RESEND 2/4] mt76: usb: do not use sg buffers for mcu messages lorenzo
2019-02-12 13:42 ` [PATCH RESEND 3/4] mt76: usb: use a linear buffer for tx/rx datapath if sg is not supported lorenzo
2019-02-12 13:42 ` [PATCH RESEND 4/4] mt76: usb: introduce disable_usb_sg parameter lorenzo
2019-02-12 13:45 ` [PATCH 0/4] do not use sg if not properly supported by usb controller Stanislaw Gruszka
2019-02-12 13:51   ` Stanislaw Gruszka
2019-02-12 14:09     ` Lorenzo Bianconi
2019-02-12 14:17       ` Stanislaw Gruszka
2019-02-12 14:25         ` Lorenzo Bianconi
2019-02-12 14:54           ` Stanislaw Gruszka
2019-02-12 15:08             ` Lorenzo Bianconi
2019-02-12 15:26               ` Stanislaw Gruszka
2019-02-12 15:50                 ` Lorenzo Bianconi
2019-02-12 22:09                   ` Lorenzo Bianconi
2019-02-13  9:44                     ` Stanislaw Gruszka
2019-02-13 11:00                       ` Lorenzo Bianconi [this message]
2019-02-13 11:59                         ` Stanislaw Gruszka
2019-02-18 18:56 ` [PATCH RESEND " Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190213110041.GI6376@localhost.localdomain \
    --to=lorenzo.bianconi@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).