linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karl Beldan <karl.beldan@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Seth Forshee <seth.forshee@canonical.com>,
	linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	Arend van Spriel <arend@broadcom.com>,
	"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
	Brett Rudley <brudley@broadcom.com>,
	Roland Vossen <rvossen@broadcom.com>,
	Kan Yan <kanyan@broadcom.com>,
	brcm80211-dev-list@broadcom.com
Subject: Re: [PATCH 00/18] brcmsmac: Tx rework and expanded debug/trace support
Date: Sat, 3 Nov 2012 14:50:22 +0100	[thread overview]
Message-ID: <20121103135022.GA13562@eleaks.org> (raw)
In-Reply-To: <1351941357.21705.4.camel@jlt4.sipsolutions.net>

On Sat, Nov 03, 2012 at 12:15:57PM +0100, Johannes Berg wrote:
> On Fri, 2012-11-02 at 11:49 +0100, Karl Beldan wrote:
> 
> > > The patches also add flow control to stop incoming tx packets when the
> > > DMA ring is full. In practice I found that we will sometimes receive a
> > > single frame from mac80211 after stopping the queues, so some headroom
> > > is reserved when stopping the queues. I also reduced the number of tx
> > > descriptors per ring to 64 and fixed a bug that prevented having
> > > differing non-zero numbers of tx and rx descriptors for a given ring.
> > >
> > It is strange that you would get one frame after stopping the queues.
> > Apart from the iface up/down code which I did not look at, it seems the tx 
> > codepaths for queues stop/wake are all properly protected by spin_lock_bhs.
> > You mention a possible race in your code comments .. are you referring to 
> > mac80211 or the driver itself ?
> 
> It's generally a race between mac80211 and the driver, if the driver
> uses ieee80211_stop_queue() outside the TX path, the TX path can be
> handing it a packet at the exact same time, and therefore there can be
> one packet (on each queue!) that goes to the driver during the call to
> stop_queue().
> 
Yes, yet in this case, it seems to be another pb.
The driver performs ieee80211_stop_queue() inside the TX path exept for the 
call within the tx status callback tasklet for ampdu retries - and the latter 
should not trigger the pb since, as the comment puts it:
{
                /*
                 * We shouldn't be out of space in the DMA
                 * ring here since we're reinserting a frame
                 * that was just pulled out.
                 */
}
At first sight I would more likely doubt the txavail, though I haven't really
looked into the code, the potential race caught my attention within the diff 
and I thought it might be useful to follow up.

 
Karl

  reply	other threads:[~2012-11-03 13:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26 14:23 [PATCH 00/18] brcmsmac: Tx rework and expanded debug/trace support Seth Forshee
2012-10-26 14:23 ` [PATCH 01/18] brcmsmac: Rework tx code to avoid internal buffering of packets Seth Forshee
2012-11-01 17:43   ` Arend van Spriel
2012-11-02  7:28     ` Seth Forshee
2012-10-26 14:23 ` [PATCH 02/18] brcmsmac: Use correct descriptor count when calculating next rx descriptor Seth Forshee
2012-10-26 14:23 ` [PATCH 03/18] brcmsmac: Reduce number of entries in tx DMA rings Seth Forshee
2012-10-26 14:23 ` [PATCH 04/18] brcm80211: Allow trace support to be enabled separately from debug Seth Forshee
2012-10-26 14:23 ` [PATCH 05/18] brcm80211: Add macro for checking if debug log levels are enabled Seth Forshee
2012-10-26 14:23 ` [PATCH 06/18] brcm80211: Convert log message levels to debug levels Seth Forshee
2012-10-26 14:23 ` [PATCH 07/18] brcmsmac: Add module parameter for setting the debug level Seth Forshee
2012-10-26 14:23 ` [PATCH 08/18] brcmsmac: Add support for writing debug messages to the trace buffer Seth Forshee
2012-10-26 14:23 ` [PATCH 09/18] brcmsmac: Use debug macros for general error and debug statements Seth Forshee
2012-10-26 14:23 ` [PATCH 10/18] brcmsmac: Add BRCMS_DBG_MAC80211 debug macro Seth Forshee
2012-10-26 14:23 ` [PATCH 11/18] brcmsmac: Add RX and TX debug macros Seth Forshee
2012-10-26 14:23 ` [PATCH 12/18] brcmsmac: Add INT debug macro Seth Forshee
2012-10-26 14:23 ` [PATCH 13/18] brcmsmac: Add DMA " Seth Forshee
2012-10-26 14:23 ` [PATCH 14/18] brcmsmac: Add HT " Seth Forshee
2012-10-26 14:23 ` [PATCH 15/18] brcmsmac: Improve tx trace and debug support Seth Forshee
2012-10-26 14:23 ` [PATCH 16/18] brcmsmac: Add tracepoint for macintstatus Seth Forshee
2012-10-26 14:23 ` [PATCH 17/18] brcmsmac: Add tracepoint for AMPDU session information Seth Forshee
2012-10-26 14:23 ` [PATCH 18/18] brcmsmac: Remove some noisy but uninformative debug messages Seth Forshee
2012-10-26 15:37 ` [PATCH 00/18] brcmsmac: Tx rework and expanded debug/trace support Arend van Spriel
2012-10-26 16:04   ` Seth Forshee
2012-11-02 10:49 ` Karl Beldan
2012-11-03 11:15   ` Johannes Berg
2012-11-03 13:50     ` Karl Beldan [this message]
2012-11-04 20:11       ` Seth Forshee
2012-11-03 17:56 ` Arend van Spriel
2012-11-04 20:25   ` Seth Forshee
2012-11-14 16:05     ` Seth Forshee
2012-11-14 19:40       ` Arend van Spriel
2012-11-06  7:12 ` Daniel Wagner
2012-11-06  8:19   ` Daniel Wagner
2012-11-06 10:02     ` Seth Forshee
2012-11-06 12:16       ` Daniel Wagner
2012-11-06 12:47         ` Seth Forshee
2012-11-06 12:49           ` Arend van Spriel
2012-11-06 10:20     ` Arend van Spriel
2012-11-06 10:44       ` Piotr Haber
2012-11-06 12:27         ` Daniel Wagner
2012-11-06 12:54           ` Seth Forshee

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=20121103135022.GA13562@eleaks.org \
    --to=karl.beldan@gmail.com \
    --cc=arend@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=frankyl@broadcom.com \
    --cc=johannes@sipsolutions.net \
    --cc=kanyan@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rvossen@broadcom.com \
    --cc=seth.forshee@canonical.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).