linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: nbd@nbd.name, linux-wireless@vger.kernel.org,
	lorenzo.bianconi@redhat.com
Subject: Re: [PATCH] mt76: introduce q->stopped parameter
Date: Thu, 28 Feb 2019 12:45:52 +0100	[thread overview]
Message-ID: <20190228114551.GB6072@redhat.com> (raw)
In-Reply-To: <ec189b4ec030646d4dbfd0b7c41944ab383edc4e.1551301983.git.lorenzo@kernel.org>

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.

Stanislaw

  reply	other threads:[~2019-02-28 11:46 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 [this message]
2019-02-28 12:31     ` Lorenzo Bianconi

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=20190228114551.GB6072@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    /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).