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: Lorenzo Bianconi <lorenzo@kernel.org>,
	nbd@nbd.name, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mt76: introduce q->stopped parameter
Date: Thu, 28 Feb 2019 13:31:52 +0100	[thread overview]
Message-ID: <20190228123151.GD2768@localhost.localdomain> (raw)
In-Reply-To: <20190228114551.GB6072@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 903 bytes --]

> On Wed, Feb 27, 2019 at 10:40:41PM +0100, Lorenzo Bianconi wrote:
> > @@ -289,9 +290,14 @@ mt76_tx(struct mt76_dev *dev, struct ieee80211_sta *sta,
> >  	dev->queue_ops->tx_queue_skb(dev, q, skb, wcid, sta);
> >  	dev->queue_ops->kick(dev, q);
> >  
> > -	if (q->queued > q->ndesc - 8)
> > -		ieee80211_stop_queue(dev->hw, skb_get_queue_mapping(skb));
> > +	stop = q->queued > q->ndesc - 8 && !q->stopped;
> > +	if (stop)
> > +		q->stopped = true;
> > +
> >  	spin_unlock_bh(&q->lock);
> > +
> > +	if (stop)
> > +		ieee80211_stop_queue(dev->hw, skb_get_queue_mapping(skb));
> 
> I don't think taking this outside of spin_lock section is beneficial.
> Actually is better to do this faster than slower to prevent enqueue
> frames by mac80211 and then dropped them due to lack of space in
> mt76 queue.

ack, I will send a v2 moving it back.

Regards,
Lorenzo

> 
> Stanislaw

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2019-02-28 12:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1551301983.git.lorenzo@kernel.org>
2019-02-27 21:40 ` [PATCH] mt76: introduce q->stopped parameter Lorenzo Bianconi
2019-02-28 11:45   ` Stanislaw Gruszka
2019-02-28 12:31     ` Lorenzo Bianconi [this message]

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=20190228123151.GD2768@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).