All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v5 01/11] mt76: add hash lookup for skb on TXS status_list
Date: Fri, 13 Aug 2021 11:01:29 -0700	[thread overview]
Message-ID: <97657c37-8920-c8ba-a05c-28552ab71967@candelatech.com> (raw)
In-Reply-To: <d479d24c-87b4-51c3-8f07-d71480913f8f@nbd.name>

On 8/13/21 10:46 AM, Felix Fietkau wrote:

>>>> diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
>>>> index 6f302acb6e69..4c8504d3c904 100644
>>>> --- a/drivers/net/wireless/mediatek/mt76/tx.c
>>>> +++ b/drivers/net/wireless/mediatek/mt76/tx.c
>>>> @@ -130,15 +154,30 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,
>>>>    			     IEEE80211_TX_CTL_RATE_CTRL_PROBE)))
>>>>    		return MT_PACKET_ID_NO_SKB;
>>>>    
>>>> +	/* due to limited range of the pktid (7 bits), we can only
>>>> +	 * have a limited number of outstanding frames.  I think it is OK to
>>>> +	 * check the length outside of a lock since it doesn't matter too much
>>>> +	 * if we read wrong data here.
>>>> +	 * The TX-status callbacks don't always return a callback for an SKB,
>>>> +	 * so the status_list may contain some stale skbs.  Those will be cleaned
>>>> +	 * out periodically, see MT_TX_STATUS_SKB_TIMEOUT.
>>>> +	 */
>>>> +
>>>> +	qlen = skb_queue_len(&dev->status_list);
>>>> +	if (qlen > 120)
>>>> +		return MT_PACKET_ID_NO_SKB;
>>> Checking the length of the per-device status list doesn't make sense,
>>> since pktid allocation is per-wcid.
>>
>> Ok, so just remove this code, or should I set some other higher
>> limit to bound the list?
> You could just check for a duplicate skb_status_array entry.

Ok, that will happen anyway when searching for next wcid pkt-id.

The check above was a quick bail-out before locks were acquired.

I'll just remove that qlen check...

Thanks,
Ben

> 
> - Felix
> 


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

      reply	other threads:[~2021-08-13 18:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 13:44 [PATCH v5 01/11] mt76: add hash lookup for skb on TXS status_list greearb
2021-08-04 13:44 ` [PATCH v5 02/11] mt76: mt7915: fix potential NPE in TXS processing greearb
2021-08-04 13:44 ` [PATCH v5 03/11] mt76: mt7915: move TXS parsing to its own method greearb
2021-08-04 13:44 ` [PATCH v5 04/11] mt76: mt7915: allow processing TXS for 'NO_SKB' pkt-ids greearb
2021-08-13 17:13   ` Felix Fietkau
2021-08-04 13:44 ` [PATCH v5 05/11] mt76: mt7915: debugfs hook to enable TXS for NO_SKB pkt-ids greearb
2021-08-13 17:16   ` Felix Fietkau
2021-08-19 16:06   ` Kalle Valo
2021-08-19 16:08     ` Ben Greear
2021-10-11  9:28       ` Kalle Valo
2021-10-11 14:12         ` Ben Greear
2021-08-04 13:45 ` [PATCH v5 06/11] mt76: mt7915: add note about TXSFM 0x2 greearb
2021-08-04 13:45 ` [PATCH v5 07/11] mt76: mt7915: add support for tx-overrides greearb
2021-08-19 15:08   ` Kalle Valo
2021-08-19 16:16     ` Ben Greear
2021-08-04 13:45 ` [PATCH v5 08/11] mt76: mt7915: fix SGI reporting when using tx-overrides greearb
2021-08-04 13:45 ` [PATCH v5 09/11] mt76: mt7915: txfree status to show txcount instead of latency greearb
2021-08-04 13:45 ` [PATCH v5 10/11] mt76: mt7915: report tx-retries greearb
2021-08-04 13:45 ` [PATCH v5 11/11] mt76: mt7915: add a missing HT flag for GI parsing greearb
2021-08-13 16:50 ` [PATCH v5 01/11] mt76: add hash lookup for skb on TXS status_list Felix Fietkau
2021-08-13 17:28   ` Ben Greear
2021-08-13 17:46     ` Felix Fietkau
2021-08-13 18:01       ` Ben Greear [this message]

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=97657c37-8920-c8ba-a05c-28552ab71967@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=linux-wireless@vger.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 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.