linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 4/8] iwlwifi: mvm: fix race in sync rx queue notification
Date: Fri, 04 Oct 2019 21:06:09 +0300	[thread overview]
Message-ID: <d8a3195b919e86e2c39e17e8c93cc0fcef19ae12.camel@coelho.fi> (raw)
In-Reply-To: <87imp4sk5j.fsf@codeaurora.org>

On Fri, 2019-10-04 at 16:41 +0300, Kalle Valo wrote:
> Luca Coelho <luca@coelho.fi> writes:
> 
> > From: Naftali Goldstein <naftali.goldstein@intel.com>
> > 
> > Consider the following flow:
> >  1. Driver starts to sync the rx queues due to a delba.
> >     mvm->queue_sync_cookie=1.
> >     This rx-queues-sync is synchronous, so it doesn't increment the
> >     cookie until all rx queues handle the notification from FW.
> >  2. During this time, driver starts to sync rx queues due to nssn sync
> >     required.
> >     The cookie's value is still 1, but it doesn't matter since this
> >     rx-queue-sync is non-synchronous so in the notification handler the
> >     cookie is ignored.
> >     What _does_ matter is that this flow increments the cookie to 2
> >     immediately.
> >     Remember though that the FW won't start servicing this command until
> >     it's done with the previous one.
> >  3. FW is still handling the first command, so it sends a notification
> >     with internal_notif->sync=1, and internal_notif->cookie=0, which
> >     triggers a WARN_ONCE.
> > 
> > The solution for this race is to only use the mvm->queue_sync_cookie in
> > case of a synchronous sync-rx-queues. This way in step 2 the cookie's
> > value won't change so we avoid the WARN.
> > 
> > The commit in the "fixes" field is the first commit to introduce
> > non-synchronous sending of this command to FW.
> 
> But I don't see a Fixes field anywhere :)

Hmmm, good catch.  My script should have added it.  One more thing to
check... *sigh*

This is the aforementioned commit:

Fixes: 3c514bf831ac ("iwlwifi: mvm: add a loose synchronization of the NSSN across Rx queues")

I'll add it and include it when I send the pull-req.

Thanks!

--
Cheers,
Luca.


  reply	other threads:[~2019-10-04 18:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 13:14 [PATCH 0/8] iwlwifi: fixes intended for 5.4 2019-10-04 Luca Coelho
2019-10-04 13:14 ` [PATCH 1/8] iwlwifi: don't access trans_cfg via cfg Luca Coelho
2019-10-04 13:14 ` [PATCH 2/8] iwlwifi: fix ACPI table revision checks Luca Coelho
2019-10-04 13:14 ` [PATCH 3/8] iwlwifi: mvm: force single phy init Luca Coelho
2019-10-04 13:14 ` [PATCH 4/8] iwlwifi: mvm: fix race in sync rx queue notification Luca Coelho
2019-10-04 13:41   ` Kalle Valo
2019-10-04 18:06     ` Luca Coelho [this message]
2019-10-04 13:14 ` [PATCH 5/8] iwlwifi: pcie: fix indexing in command dump for new HW Luca Coelho
2019-10-04 13:14 ` [PATCH 6/8] iwlwifi: pcie: fix rb_allocator workqueue allocation Luca Coelho
2019-10-04 13:14 ` [PATCH 7/8] iwlwifi: dbg_ini: fix memory leak in alloc_sgtable Luca Coelho
2019-10-04 13:14 ` [PATCH 8/8] iwlwifi: pcie: fix memory leaks in iwl_pcie_ctxt_info_gen3_init Luca Coelho

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=d8a3195b919e86e2c39e17e8c93cc0fcef19ae12.camel@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --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 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).