ath12k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
To: Jeff Johnson <quic_jjohnson@quicinc.com>, <ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>,
	Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
Subject: Re: [PATCH 10/13] wifi: ath12k: subscribe required word mask from rx tlv
Date: Sat, 6 Jan 2024 00:12:04 +0530	[thread overview]
Message-ID: <cd79cbd5-f118-15fa-5a1a-d3e3bed3b293@quicinc.com> (raw)
In-Reply-To: <b0ac4a51-9a24-443a-8155-6100d5e6b00f@quicinc.com>

On 10/31/2023 6:23 AM, Jeff Johnson wrote:
> On 10/30/2023 3:26 PM, Raj Kumar Bhagat wrote:
>> From: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
>>
>> Most of the RX descriptors fields are currently not used in the
>> ath12k driver. Hence add support to selectively subscribe to the
>> required quad words (64 bits) within msdu_end and mpdu_start of
>> rx_desc.
>>
>> Add compact rx_desc structures and configure the bit mask for Rx TLVs
>> (msdu_end, mpdu_start, mpdu_end) via registers. With these registers
>> SW can configure to DMA the partial TLV struct to Rx buffer.
>>
>> Each TLV type has its own register to configure the mask value.
>> The mask value configured in register will indicate if a particular
>> QWORD has to be written to rx buffer or not i.e., if Nth bit is enabled
>> in the mask Nth QWORD will be written and it will not be written if the
>> bit is disabled in mask. While 0th bit indicates whether TLV tag will be
>> written or not.
>>
>> Advantages of Qword subscription of TLVs
>> - Avoid multiple cache-line misses as the all the required fields
>> of the TLV are within 128 bytes.
>> - Memory optimization as TLVs + DATA + SHINFO can fit in 2k buffer
>> even for 64 bit kernel.
>>
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>>
>> Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
>> Co-developed-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
>> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
>> ---
>>   drivers/net/wireless/ath/ath12k/dp.c      |   9 +
>>   drivers/net/wireless/ath/ath12k/dp.h      |  13 +
>>   drivers/net/wireless/ath/ath12k/dp_rx.c   |  16 +-
>>   drivers/net/wireless/ath/ath12k/dp_tx.c   |  20 ++
>>   drivers/net/wireless/ath/ath12k/hal.c     | 352 ++++++++++++++++++++++
>>   drivers/net/wireless/ath/ath12k/hal.h     |   3 +
>>   drivers/net/wireless/ath/ath12k/rx_desc.h | 112 ++++++-
>>   drivers/net/wireless/ath/ath12k/wmi.h     |   2 +
>>   8 files changed, 519 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c
>> index 80d7ce44d..faeef965e 100644
>> --- a/drivers/net/wireless/ath/ath12k/dp.c
>> +++ b/drivers/net/wireless/ath/ath12k/dp.c
>> @@ -1001,6 +1001,15 @@ void ath12k_dp_pdev_pre_alloc(struct ath12k_base *ab)
>>     void ath12k_dp_hal_rx_desc_init(struct ath12k_base *ab)
>>   {
>> +    if (test_bit(WMI_TLV_SERVICE_WMSK_COMPACTION_RX_TLVS, ab->wmi_ab.svc_map) &&
>> +        ab->hw_params->hal_ops->rxdma_ring_wmask_rx_mpdu_start &&
>> +        ab->hw_params->hal_ops->rxdma_ring_wmask_rx_msdu_end) {
>> +        /* RX TLVS compaction is supported, hence change the hal_rx_ops
>> +         * based on device.
>> +         */
>> +        if (ab->hal_rx_ops == &hal_rx_qcn9274_ops)
>> +            ab->hal_rx_ops = &hal_rx_qcn9274_compact_ops;
> 
> I only have one comment on this patch.
> 
> in order to avoid chipset-specific logic here suggest that there should be an abstraction.
> 
> several ideas come to mind:
> 1) have a hal_ops callback to retrieve it
> 2) have a pointer to the compact ops in the hw_params
> 
> since we are already using hal_ops to get the masks, suggest that is where we should get the pointer to the compact ops
> 
Thanks Jeff for the suggestion, will implement hal_ops to retrieve
the corresponding compact ops.

>> +    }
>>       ab->hal.hal_desc_sz =
>>           ab->hal_rx_ops->rx_desc_get_desc_size();
>>   }
> 



  reply	other threads:[~2024-01-05 18:42 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30 22:26 [PATCH 00/13] wifi: ath12k: QCN9274 dualmac bring up Raj Kumar Bhagat
2023-10-30 22:26 ` [PATCH 01/13] wifi: ath12k: Update enum wmi_direct_buffer_module Raj Kumar Bhagat
2023-10-30 22:43   ` Jeff Johnson
2023-10-30 22:26 ` [PATCH 02/13] wifi: ath12k: indicate NON MBSSID vdev by default during vdev start Raj Kumar Bhagat
2023-10-30 23:12   ` Jeff Johnson
2024-01-05 18:35     ` Raj Kumar Bhagat
2023-10-30 22:26 ` [PATCH 03/13] wifi: ath12k: fetch correct pdev id from WMI_SERVICE_READY_EXT_EVENTID Raj Kumar Bhagat
2023-10-30 23:14   ` Jeff Johnson
2023-10-30 22:26 ` [PATCH 04/13] wifi: ath12k: add support for peer meta data version Raj Kumar Bhagat
2023-10-30 23:16   ` Jeff Johnson
2023-10-30 22:26 ` [PATCH 05/13] wifi: ath12k: fix fetching MCBC flag for QCN9274 Raj Kumar Bhagat
2023-10-30 23:17   ` Jeff Johnson
2023-10-30 22:26 ` [PATCH 06/13] wifi: ath12k: Add logic to write QRTR node id to scratch Raj Kumar Bhagat
2023-10-30 23:18   ` Jeff Johnson
2023-11-02 15:33   ` Kalle Valo
2023-10-30 22:26 ` [PATCH 07/13] wifi: ath12k: fix firmware assert during insmod in memory segment mode Raj Kumar Bhagat
2023-10-30 23:27   ` Jeff Johnson
2023-10-30 22:26 ` [PATCH 08/13] wifi: ath12k: split hal_ops to support RX TLVs word mask compaction Raj Kumar Bhagat
2023-10-30 23:33   ` Jeff Johnson
2023-10-30 22:26 ` [PATCH 09/13] wifi: ath12k: remove hal_desc_sz from hw params Raj Kumar Bhagat
2023-10-30 23:34   ` Jeff Johnson
2023-10-30 22:26 ` [PATCH 10/13] wifi: ath12k: subscribe required word mask from rx tlv Raj Kumar Bhagat
2023-10-31  0:53   ` Jeff Johnson
2024-01-05 18:42     ` Raj Kumar Bhagat [this message]
2023-10-30 22:26 ` [PATCH 11/13] wifi: ath12k: add MAC id support in WBM error path Raj Kumar Bhagat
2023-10-31  1:01   ` Jeff Johnson
2023-10-30 22:26 ` [PATCH 12/13] wifi: ath12k: fix PCI read and write Raj Kumar Bhagat
2023-10-31  1:04   ` Jeff Johnson
2023-10-30 22:27 ` [PATCH 13/13] wifi: ath12k: Read board id to support split-PHY QCN9274 Raj Kumar Bhagat
2023-10-31  1:06   ` Jeff Johnson

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=cd79cbd5-f118-15fa-5a1a-d3e3bed3b293@quicinc.com \
    --to=quic_rajkbhag@quicinc.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_jjohnson@quicinc.com \
    --cc=quic_kathirve@quicinc.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 read-only IMAP folder(s) and NNTP newsgroup(s).