From: Rajkumar Manoharan <rmanohar@codeaurora.org>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Rajkumar Manoharan <rmanohar@qti.qualcomm.com>,
ath10k@lists.infradead.org
Subject: Re: [PATCH v2] ath10k: move mgmt descriptor limit handle under mgmt_tx
Date: Tue, 08 Mar 2016 16:51:17 +0530 [thread overview]
Message-ID: <4ac3af9a07398243a8a363692cc62f47@codeaurora.org> (raw)
In-Reply-To: <CA+BoTQmnY0omFh0iddjcVBXubt3WC49DpFumUBY=NSCYs-PuHw@mail.gmail.com>
On , Michal Kazior wrote:
> On 6 March 2016 at 08:47, Rajkumar Manoharan
> <rmanohar@qti.qualcomm.com> wrote:
>> Firmware reserves few descriptors for management frames transmission.
>> In 16 MBSSID scenario, these slots will be easy exhausted due to
>> frequent
>> probe responses. So for 10.4 based solutions, probe responses are
>> limited
>> by a threshold (24).
>>
>> management tx path is separate for all except tlv based solutions.
>> Since
>> tlv solutions (qca6174 & qca9377) do not support 16 AP interfaces, it
>> is
>> safe to move management descriptor limitation check under mgmt_tx
>> function. Though CPU improvement is negligible, unlikely conditions or
>> never hit conditions in hot path can be avoided on data transmission.
>>
>> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
>> ---
>> v2:
>> - rebased on top of Michal changes
> [...]
>> @@ -3979,13 +3977,22 @@ static void ath10k_mac_op_tx(struct
>> ieee80211_hw *hw,
>> is_htt = (txpath == ATH10K_MAC_TX_HTT ||
>> txpath == ATH10K_MAC_TX_HTT_MGMT);
>>
>> - if (is_htt) {
>> - spin_lock_bh(&ar->htt.tx_lock);
>> -
>> - is_mgmt = ieee80211_is_mgmt(hdr->frame_control);
>> + is_mgmt = ieee80211_is_mgmt(hdr->frame_control);
>> + spin_lock_bh(&ar->htt.tx_lock);
>> + if (is_mgmt) {
>> is_presp =
>> ieee80211_is_probe_resp(hdr->frame_control);
>>
>> - ret = ath10k_htt_tx_inc_pending(htt, is_mgmt,
>> is_presp);
>> + ret = ath10k_htt_tx_mgmt_inc_pending(htt, is_presp);
>> + if (ret) {
>> + ath10k_warn(ar, "failed to increase tx mgmt
>> pending count: %d, dropping\n",
>> + ret);
>> + spin_unlock_bh(&ar->htt.tx_lock);
>> + ieee80211_free_txskb(ar->hw, skb);
>> + return;
>> + }
>> + }
>> + if (is_htt) {
>> + ret = ath10k_htt_tx_inc_pending(htt);
>> if (ret) {
>> ath10k_warn(ar, "failed to increase tx pending
>> count: %d, dropping\n",
>> ret);
>
> This doesn't look good.
>
> You'll call ath10k_htt_tx_mgmt_inc_pending() regardless of the tx path
> being chosen. FWIW It could be WMI on older firmware, oops.
>
> Holding the lock for the entire time doesn't make much sense either,
> does it?
>
inc_pending is being called from different contexts. So it is possible
that inc_pending will return false
after mgmt_inc_pending. Thats why lock is hold until both got increased
successfully.
-Rajkumar
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>,
ath10k@lists.infradead.org,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] ath10k: move mgmt descriptor limit handle under mgmt_tx
Date: Tue, 08 Mar 2016 16:51:17 +0530 [thread overview]
Message-ID: <4ac3af9a07398243a8a363692cc62f47@codeaurora.org> (raw)
In-Reply-To: <CA+BoTQmnY0omFh0iddjcVBXubt3WC49DpFumUBY=NSCYs-PuHw@mail.gmail.com>
On , Michal Kazior wrote:
> On 6 March 2016 at 08:47, Rajkumar Manoharan
> <rmanohar@qti.qualcomm.com> wrote:
>> Firmware reserves few descriptors for management frames transmission.
>> In 16 MBSSID scenario, these slots will be easy exhausted due to
>> frequent
>> probe responses. So for 10.4 based solutions, probe responses are
>> limited
>> by a threshold (24).
>>
>> management tx path is separate for all except tlv based solutions.
>> Since
>> tlv solutions (qca6174 & qca9377) do not support 16 AP interfaces, it
>> is
>> safe to move management descriptor limitation check under mgmt_tx
>> function. Though CPU improvement is negligible, unlikely conditions or
>> never hit conditions in hot path can be avoided on data transmission.
>>
>> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
>> ---
>> v2:
>> - rebased on top of Michal changes
> [...]
>> @@ -3979,13 +3977,22 @@ static void ath10k_mac_op_tx(struct
>> ieee80211_hw *hw,
>> is_htt = (txpath == ATH10K_MAC_TX_HTT ||
>> txpath == ATH10K_MAC_TX_HTT_MGMT);
>>
>> - if (is_htt) {
>> - spin_lock_bh(&ar->htt.tx_lock);
>> -
>> - is_mgmt = ieee80211_is_mgmt(hdr->frame_control);
>> + is_mgmt = ieee80211_is_mgmt(hdr->frame_control);
>> + spin_lock_bh(&ar->htt.tx_lock);
>> + if (is_mgmt) {
>> is_presp =
>> ieee80211_is_probe_resp(hdr->frame_control);
>>
>> - ret = ath10k_htt_tx_inc_pending(htt, is_mgmt,
>> is_presp);
>> + ret = ath10k_htt_tx_mgmt_inc_pending(htt, is_presp);
>> + if (ret) {
>> + ath10k_warn(ar, "failed to increase tx mgmt
>> pending count: %d, dropping\n",
>> + ret);
>> + spin_unlock_bh(&ar->htt.tx_lock);
>> + ieee80211_free_txskb(ar->hw, skb);
>> + return;
>> + }
>> + }
>> + if (is_htt) {
>> + ret = ath10k_htt_tx_inc_pending(htt);
>> if (ret) {
>> ath10k_warn(ar, "failed to increase tx pending
>> count: %d, dropping\n",
>> ret);
>
> This doesn't look good.
>
> You'll call ath10k_htt_tx_mgmt_inc_pending() regardless of the tx path
> being chosen. FWIW It could be WMI on older firmware, oops.
>
> Holding the lock for the entire time doesn't make much sense either,
> does it?
>
inc_pending is being called from different contexts. So it is possible
that inc_pending will return false
after mgmt_inc_pending. Thats why lock is hold until both got increased
successfully.
-Rajkumar
next prev parent reply other threads:[~2016-03-08 11:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-06 7:47 [PATCH v2] ath10k: move mgmt descriptor limit handle under mgmt_tx Rajkumar Manoharan
2016-03-06 7:47 ` Rajkumar Manoharan
2016-03-08 11:05 ` Michal Kazior
2016-03-08 11:05 ` Michal Kazior
2016-03-08 11:13 ` Rajkumar Manoharan
2016-03-08 11:13 ` Rajkumar Manoharan
2016-03-08 11:21 ` Rajkumar Manoharan [this message]
2016-03-08 11:21 ` Rajkumar Manoharan
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=4ac3af9a07398243a8a363692cc62f47@codeaurora.org \
--to=rmanohar@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
--cc=rmanohar@qti.qualcomm.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 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.