All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v4] mac80211: add an intermediate software queue implementation
Date: Wed, 18 Mar 2015 21:18:55 +0100	[thread overview]
Message-ID: <5509DDAF.80706@openwrt.org> (raw)
In-Reply-To: <1426709222.3001.42.camel@sipsolutions.net>

On 2015-03-18 21:07, Johannes Berg wrote:
> On Wed, 2015-03-18 at 21:03 +0100, Felix Fietkau wrote:
>> On 2015-03-18 20:41, Johannes Berg wrote:
>> >> + * The driver is expected to release its own buffered frames and also call
>> >> + * ieee80211_tx_dequeue() within that callback.
>> > 
>> > Perhaps that should read
>> > "The driver is expected to release its own buffered frames (if any) and
>> > request the remaining dequeued frames by calling
>> > ieee80211_tx_dequeue()."
>> > 
>> > I'm not really sure it needs to be within that callback? I see no
>> > particular reason for that.
>> Releasing multiple packets works, even if there is only one packet
>> buffered in the driver and the rest in the txq. It also keeps the code
>> more consistent.
> 
> Right. I still phrased that badly. I meant that the "also" should be
> limited by the number of frames really needed, i.e. use driver-buffered
> first and fill up with any mac80211-buffered by dequeuing. That's
> probably obvious enough though.
> 
> Anyway - not sure it needs to be in the callback?
I think it makes things simpler this way. What would you prefer?

>> If I don't lock here, one last dequeue call might still be running on
>> another CPU. This would produce a theoretical race in accessing the
>> sequence number, which the caller of this function reads before setting
>> up the BA request.
>> Dequeueing happens outside of the normal network stack tx context, so
>> synchronize_net is not enough.
> 
> Ah, makes sense, I didn't think of the seqno. Can you please put that in
> a comment somewhere? :)
Sure.

- Felix

  reply	other threads:[~2015-03-18 20:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 16:21 [PATCH v4] mac80211: add an intermediate software queue implementation Felix Fietkau
2015-03-18 19:41 ` Johannes Berg
2015-03-18 20:03   ` Felix Fietkau
2015-03-18 20:07     ` Johannes Berg
2015-03-18 20:18       ` Felix Fietkau [this message]
2015-03-18 20:23         ` Johannes Berg

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=5509DDAF.80706@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.