Commit Graph

223 Commits

Author SHA1 Message Date
Linux Build Service Account
a515fb6ef8 Merge "qcacmn: Optimize DP Rx Error Handling (Part-2)" 2023-04-21 09:15:17 -07:00
Linux Build Service Account
c35c72a358 Merge "qcacmn: Correct spelling errors" 2023-04-21 03:18:20 -07:00
Kenvish Butani
969c5bdf1f qcacmn: Optimize DP Rx Error Handling (Part-2)
In WBM2SW Rx Error path for BE
specific functionality
1) HAL API's/Function pointers are replaced
with specific function calls.
2) Efficient read/write of WBM Error Info
from HAL Rx desc.
3) Minimize reading data from Nbuf TLV.
4) Peer_id fix for MLO clients with security

Change-Id: I760694073a06c1829f28e7e92cd1657560d8eb06
CRs-Fixed: 3472220
2023-04-20 13:29:39 +05:30
Kenvish Butani
711fb71599 qcacmn: Revert "Optimize DP Rx Error Handling (Part-2)"
This reverts the commit.

Change-Id: Ia1a304daa5d63a063bfc2d22b9b99ccad02af0e1
CRs-Fixed: 3472017
2023-04-19 05:43:51 -07:00
Zhiwei Yang
8bfebeb4d3 qcacmn: Correct spelling errors
Correct spelling errors
s/QCA_PADDR_CHECK_ON_3TH_PLATFORM/QCA_PADDR_CHECK_ON_3RD_PARTY_PLATFORM

Change-Id: Id33b5f250a0c44f475b3463f9a6a68f83b47b6cd
CRs-Fixed: 3462780
2023-04-17 23:20:00 -07:00
Kenvish Butani
d0d9a987fc qcacmn: Optimize DP Rx Error Handling (Part-2)
In WBM2SW Rx Error path for BE
specific functionality
1) HAL API's/Function pointers are replaced
with specific function calls.
2) Efficient read/write of WBM Error Info
from HAL Rx desc.
3) Minimize reading data from Nbuf TLV.

Change-Id: Ic8793ffcbeb2411c9b81fb32acae062e8a1f40cc
CRs-Fixed: 3362828
2023-04-07 09:13:49 -07:00
Tallapragada Kalyan
e4798ea69b qcacmn: optimization changes to improve RX KPI for WIN
done the following changes to improve the RX path KPI
	1. remove the extra invalidate in RX path as
	we no longer dirty the RX TLV cache lines.
	we now store the rx error codes in nbuf cb instead
	of RX TLVs reserved memory bytes.

	2. with features like flow tag and wds extended mode
	enabled by default, the rx_fast_flag is always set
       	to false, this resulted	in lot more instructions
       	being executed in RX path.
	Now we ensured this flag is at least set for other
	features which are not enabled by default.

Change-Id: I04c6bdc52a2b3f1248b822a108d8bd1a70abcc7c
CRs-Fixed: 3406505
2023-03-30 02:32:40 -07:00
Tallapragada Kalyan
ee4fb4380c qcacmn: replenish used nbuf for DS flows
in case of DS pkts the same pkt which is received
in RX path (REO2PPE) can be refilled back to wifi
rxdma

CRs-Fixed: 3381462
Change-Id: I3762c91110ffcc95162bf068b7a1ed3e41904824
2023-03-23 00:14:20 -07:00
Kenvish Butani
4c88b99fe7 qcacmn: Add support of HW Link ID
Add support of HW Link ID in PeerMetaData.
Retrieve the HW Link ID in both Rx per packet
path and RX Error path, store it in nbuf cb.
Use the stored value from nbuf while updating
MLO peer link statistics.

Change-Id: I11596d44fe8557af568fd399d0c0a04d2b887b2a
CRs-Fixed: 3397721
2023-03-08 07:42:49 -08:00
Kenvish Butani
7fdd918e7f qcacmn: Add Support of Rx MLO Link Stats for ML Peer
Add Support to update Rx per packet path, MLO Link
stats for ML Peer

Change-Id: Ica25993126b4ce49f9e36b7b290d9887e4885155
CRs-Fixed: 3397721
2023-03-08 07:42:17 -08:00
Kenvish Butani
3243b9e4f4 qcacmn: Add Support of Rx Err MLO Link Stats for ML Peer
Add Support to update Rx Error path, MLO Link stats
for ML Peer

Change-Id: Ie5000d0d30a41fa69c86259bae0fd7a8094bddf7
CRs-Fixed: 3397721
2023-03-08 07:42:07 -08:00
Karthik Kantamneni
82a1c01b88 qcacmn: Refactor unused RX code for SOFTUMAC platforms
In RX and defrag path some of the code in common files will
not be used by new SOFTUMAC based platform. So placing all
the unused code under SOFTUMAC macro and for better readability
clubbing all the code at one place in source file.

Change-Id: I6ff3997a42872a25fb020898f7fb1879746fc8e6
CRs-Fixed: 3382899
2023-03-04 13:22:29 -08:00
Surabhi Vishnoi
bbae800e14 qcacmn: Fix checksum offload logic for rx packets
Currently, hardware supports checksum offload for only ipv4, tcpv4/v6 and
udpv4/v6 packets. But driver sets checksum as CHECKSUM_UNNECESSARY for
all rx packets if tcp_udp_err and ip_err bit in rx_attention_tlv is not
set. If driver sets CHECKSUM_UNNECESSARY in skb then network stack will
not validate checksum and will reply to even wrong checksum packets
which is incorrect.

So, fix is to set checksum for all rx packets other than ipv4, tcpv4/v6 and
udpv4/v6 to CHECKSUM_NONE instead of CHECKSUM_UNNECESSARY so that network
stack validates checksum.

Change-Id: Ifb9c74fb729361da6db715fa667f926b71ce948f
CRs-Fixed: 3378925
2023-02-27 04:13:44 -08:00
Jeff Johnson
4c4c5b1326 qcacmn: Fix dp_rx.h documentation (pass 2)
Previous the following patch fixed all of the known kernel-doc issues
in dp/wifi3.0/dp_rx.h:
Change-Id Id0ac49ebfa23790346384d688cc6346f513a7969
qcacmn: Fix dp/wifi3.0/dp_rx.* documentation

Unfortunately, the following patch introduced two new issues since
it copied incorrectly formatted documentation that had not yet been
corrected:
Change-Id Ic51a9742f65cee677ed7f3081f49fb3ece5b42f1
qcacmn: Optimize DP Rx Error Handling (Part-1)

So fix those two new issues.

Change-Id: Iea99708e31564525d0d4a0d94ea04ef9aa036ed8
CRs-Fixed: 3403645
2023-02-13 16:16:20 -08:00
Kenvish Butani
2fbc8c8ab0 qcacmn: Optimize DP Rx Error Handling (Part-1)
1) In WBM2SW Rx Error path, code to reap and
the process the HAL descriptor is split into
BE and LI architecture specific functionality
in dp_be_rx and dp_li_rx files respectively.
2) The function to handle Null Queue desc.
error for WBM and REO Rx Error path is split
into BE and LI architecture specific
functionality in dp_be_rx and dp_li_rx files
respectively.

Change-Id: Ic51a9742f65cee677ed7f3081f49fb3ece5b42f1
CRs-Fixed: 3356179
2023-02-07 07:00:22 -08:00
Jeff Johnson
b13df1bdce qcacmn: Fix dp/wifi3.0/dp_rx.* documentation
The kernel-doc script identified a large number of documentation
issues in dp/wifi3.0/dp_rx.[ch], so fix those issues. In addition,
there are a number of instances where public functions have their
implementation documented instead of having their interface
documented, so move that documentation.

Change-Id: Id0ac49ebfa23790346384d688cc6346f513a7969
CRs-Fixed: 3373158
2023-01-26 04:10:05 -08:00
Yeshwanth Sriram Guntuka
34d893df39 qcacmn: IOMMU map and unmap RX buffers to LPASS SMMU CB
IOMMU map and unmap RX buffers into LPASS SMMU context
bank for LPASS to access RX buffers in direct link
usecases.

Change-Id: Ie72a008309e3abdf3fbc7198bb5d3af5e9497180
CRs-Fixed: 3356568
2022-12-22 00:45:12 -08:00
Manish Verma
b3ec0ca8cb qcacmn: Skip skb data inval for the PPE-DS buffers in rx replenish
In the PPE-DS UL path, the PPE-DS flag is getting set in the buffer
in the EDMA Tx complete path.
This flag is getting checked in the WLAN Rx replenish path and the
data invalidate is being skipped, if the flag is set.

CRs-Fixed: 3344458
Change-Id: I4e10deec5b373ccc93b59432576eb70d49a9304d
2022-12-12 22:35:10 -08:00
Chaithanya Garrepalli
720568a65d qcacmn: For fast recycle case invalidate TLV header
In case of fast_recycled is set we can avoid invalidating
the complete buffer as it would have been invalidated
by tx driver before giving to recycler.

But we need to still invalidate rx_pkt_tlv_size as this
area will not be invalidated in TX path

Change-Id: I9e5202d8b251a5d59117609a705a311e499d05b0
CRs-Fixed: 3332713
2022-11-13 12:13:44 -08:00
Chaithanya Garrepalli
a34dd02dd0 qcacmn: Add skb fast recycler check in rx replenish
In ethernet TX fast recycle bit is set to buffer after
invalidate.

In Rx replenish API do not invalidate buffer if fast
recycle bit is set as it is already done

Change-Id: Ic74a96033a659baac381c921aff75296d155f169
CRs-Fixed: 3321142
2022-10-27 13:25:44 -07:00
Sai Rupesh Chevuru
12c8b0d0be qcacmn: compact tlv support for QCN9224
Adding compact tlv support for QCN9224, As part of this change
Rx tlv size will reduce from 384 bytes to 128 bytes.

Change-Id: I3f42a781e42b2e696a5b25d9c5f333c8cc83b7fe
CRs-Fixed: 3274152
2022-10-14 23:42:02 -07:00
Sai Rupesh Chevuru
431514912a qcacmn: SG support in RX path
Process the sg frames received in RX path.

Change-Id: Ia2d83c75c46f804599ca8fda4668c43ee508d59e
CRs-Fixed: 3303055
2022-10-14 08:31:27 -07:00
Jeff Johnson
ebfbc0d927 qcacmn: dp: Fix misspellings
Fix misspellings in dp/...

Change-Id: I6ef7a19ee03104ae38a8a77e229b90aa80329592
CRs-Fixed: 3304682
2022-10-07 22:42:22 -07:00
Devender Kumar
a85ce1152c qcacmn: Debug framework for SMMU buffer tracker for IPA offload
Debug framework for tracking the SMMU mapping and unmapping of
skb buffer when IPA offload is enable and IPA_SMMU_NBUF_TRACKER
is define.

CRs-Fixed: 3255423
change-Id: I8966097945b33cb866f4642b98b3d1a4beabfad7
2022-09-13 03:24:34 -07:00
Chaithanya Garrepalli
daed8f2cc5 qcacmn: Changes for Rx fast flag
Change to avoid processing of extended features
based of Fast RX flag

Also add changes to enable or disable this flag
based on feature settings

Change-Id: I8064780a271f8bdcf396bb9e2e2c14998f195535
CRs-Fixed: 3268842
2022-09-08 12:24:27 -07:00
Pavankumar Nandeshwar
67de6bcbfd qcacmn: Handle Umac post reset at host
Handle Umac post reset and post reset complete
events from firmware.

Change-Id: I76ac1b96f01f026535d31edcbd245b3643ecf6ee
CRs-Fixed: 3267222
2022-08-21 00:37:46 -07:00
Venkateswara Naralasetty
4fc084d9c6 qcacmn: change pool id validation for mon status ring process
Pool id validation should not be against MAX_PDEV_CNT because pool id
1 is valid in case of monitor status ring process. Hence, added a new
API dp_get_rx_mon_status_desc_from_cookie() which validate the pool id
against NUM_RXDMA_RINGS_PER_PDEV to get rx_desc from rx_desc_status pool.

Change-Id: I20baf8c667c1983eff08a204afe3736708d844d1
CRs-Fixed: 3262544
2022-08-12 04:28:18 -07:00
Yu Tian
ed3ba3ca44 qcacmn: Replenish more RX buffers when refill ring runs low
When nbuf allocation failure happens, there is no retry scheme.
So RX buffers in refill ring may shrink and not got enlarged.
This change is aimed to replenish more RX buffers when watermark
is less than critical low threshold.

Change-Id: I201b9e252ba08ba1bff47e0b5ec819a45f1b1ddf
CRs-Fixed: 3245915
2022-08-11 12:43:23 -07:00
Tallapragada Kalyan
f7a1c7e0c7 qcacmn: Add HW, SW and nbuf prefetch support in Berryllium
Add HW, SW and nbuf prefetch support in Berryllium, this will
ensure we have prefetched the HW desc, SW desc and nbuf by
the time we are in the 3rd iteration of the dp_rx_be_process
first loop.

CRs-Fixed: 3218647
Change-Id: I27d371c5d1c9a37d61e4fc00d5eb03609fad589c
2022-08-11 09:47:27 -07:00
Jinwei Chen
9b323ded29 qcacmn: Support RX T-put simulation for KIWI
Duplicate X times of RX packet before delivering to stack, if OTA
RX T-put is 100 Mbps and try to simulate 200 Mbps RX T-put,
duplicate extra 1 time RX packets, this is aimed to test
driver/stack RX capability.

Change-Id: Iaf4db05d0ec0e0cda5fac19fa63b9d3133270847
CRs-Fixed: 3132743
2022-07-24 01:02:01 -07:00
Venkateswara Naralasetty
333ae2374e qcacmn: fix invalid rx desc pool access
Only one rx desc pool is used for MCL for Rx data. Pool_id from
the SW cookie is used to get the rx desc from the corresponding
rx desc pool. Checking pool_id against MAX_RXDESC_POOLS may lead
to kernel NULL pointer dereference Since, pool_id other than 0
is not valid for MCL.

Fix this issue by checking pool_id against MAX_PDEV_CNT
to get the rx desc from rx desc pool.

Change-Id: Ib9b152ac2cfe2c16d388aca9e22440fbcdf7fe6c
CRs-Fixed: 3244453
2022-07-23 21:04:56 -07:00
jinbliu
a8f2b81354 qcacmn: Skip special frame rate info update
To avoid unmeaningful rate fluctuation, when report
rx linkspeed to upper layer, exclude special frames:
arp/ssdp/dhcp/eapol/ipv6 NA/NS/DHCPV6 in low rate.

Change-Id: I4bc49a808a02b4bc8c687f70690922045d65e739
CRs-Fixed: 3198484
2022-07-15 13:35:11 -07:00
Devender Kumar
277054124d qcacmn: AST entry create and update support for IPA
To support WDS feature in IPA driver, WLAN needs
to update the ast entry for any new rx packet, and for
end-nodes connected via repeater to root.

CRs-Fixed: 3226348
Change-Id: I7383b12f18e7c70ec06499d66130667eca033131
2022-07-13 02:37:22 -07:00
Neha Bisht
87596da3e4 qcacmn: Avoid qdf framework for nbuf free in Tx. simple path
Avoid qdf framework for nbuf_free in Tx. simple path.

Change-Id: Ic0a82279586a16f07625fc78d3e07d1a134af3a4
CRs-Fixed: 3224285
2022-06-29 04:31:25 -07:00
Rakesh Pillai
4b31289715 qcacmn: Skip sanity of sw_cookie in RX error for KIWI
Currently the sw_cookie is validated in RX error path
using the pool_id logic, which is not valid for KIWI target.
Kiwi target has a different logic to assign rx sw_cookie, as
compared to other legacy chipsets.

Hence this sanity of sw_cookie fails always for RX error
packets on KIWI target, and these corresponding buffers are
never released/replenished back. Eventually as more RX error
packets are received, the device runs out of buffers in the
refill ring and induces a backpressure.

Hence disable this sanity check for sw_cookie in rx error
path for KIWI target.

Change-Id: I320fcb268c1fe24695daeb4677af6cc0cbc445ed
CRs-Fixed: 3228792
2022-06-25 03:03:37 -07:00
Karthik Kantamneni
b70014489c qcacmn: Avoid invalid Rx descriptor access in error path
There is possibility of receiving invalid SW cookie
which maps to invalid rx descriptor access, to avoid such
issues validate the SW cookie before using it for fetching
rx descriptor

Change-Id: Ib90a398865c5e0afedd5804615d6df6ad5ee77f6
CRs-Fixed: 3214570
2022-06-17 13:11:11 -07:00
Subrat Dash
ed329bd354 qcacmn: Avoid using smp_processor_id() when preemptible
Call trace is observed in the function dp_rx_per_core_stats_update()
with the following message.

"using smp_processor_id() in preemptible"

Use qdf_get_cpu() as it takes care for disabling preemption.

CRs-Fixed: 3203385
Change-Id: I9761bf707b5ee92c7e0bb698c2825c9369efd7d5
2022-06-11 06:56:47 -07:00
Chaithanya Garrepalli
d66a8a55bb qcacmn: Use common REO2SW rings for all SOCs of MLO
Use common REO2SW rings for the packets coming from
all chips of MLO

Change-Id: Icdfd3292d2fbf5e38c1d3b8ff4b30b18009a49f8
CRs-Fixed: 3208378
2022-06-07 19:27:03 -07:00
Adwait Nayak
94eec2edd6 qcacmn: Fix to process the RX_PPDU_END_STATUS_DONE TLV
RX_PPDU_END_STATUS_DONE TLV is not being processed, since Host
is not copying the last byte from the payload.
Add code to copy the full payload from status frag and process
it to the upper layer.

Change-Id: I51d03f5664b2944008936e3711f2ba74bcfde89c
CRs-Fixed: 3179137
2022-04-28 15:46:24 -07:00
Ananya Gupta
42dd66b280 qcacmn: Allow all OOR frames to deliver to stack
Few APs are sending bar frame right after sending a
packet but the packet is not received and its retry
is received with the same sequence number. As SSN
is moved ahead due to bar frame, this packet is being
dropped.
To fix this, allow all frames to get delivered to stack.

Change-Id: I17f7126c8d318415e88b037b72563cf53cb14066
CRs-Fixed: 3151908
2022-03-21 13:09:13 -07:00
Jia Ding
d40b388d2f qcacmn: Mark first packet after wow wakeup
Add feature support to tag first packet that wakes up HOST from WoW.

rx_pkt_tlv.rx_msdu_end.reserved_1a field is used by TARGET to meet
such request.

Change-Id: I3d37e13e8cff49bc4f622d3070a19e4c4be56417
CRs-Fixed: 3137621
2022-03-03 07:22:05 -08:00
Harsh Kumar Bijlani
93cd9e0af8 qcacmn: Update stats in dp_txrx_peer in per packet path
Update stats in dp_txrx_peer in per packet Tx completion and
Rx path.

Change-Id: I807cb5ca9fe2aeeabdd4cb95d6e30cb9781560f4
CRs-Fixed: 3092123
2022-02-09 11:54:46 -08:00
Pavankumar Nandeshwar
b9038e9d4e qcacmn: Move per packet stats params to txrx_peer
Move the stats parameters from the dp_peer which are used
in per packet path to txrx_peer

Change-Id: Ieb68b6950740791b37bbd2bfdc4815c3d7bc4834
CRs-Fixed: 3095637
2022-02-09 11:54:01 -08:00
Pavankumar Nandeshwar
98b25a2ee6 qcacmn: use txrx_peer in rx and tx paths
Use txrx_peer in rx and tx data paths instead of
main dp peer.

Change-Id: If628543092be220021240b6f25ee43b009592bac
CRs-Fixed: 3095637
2022-02-09 11:53:55 -08:00
Tallapragada Kalyan
b265fdd7fc qcacmn: introduce simple nbuf_free API in RX path
simple Alloc is being used in RX path which avoids
certain debug logic. during free of nbuf we should
avoid this debug logic else it will report it as
double free, this will be triggered only when debug
is enabled

Change-Id: Iadb40071fb733cc4de3291784df5075d5a099a8e
2022-02-02 12:06:34 -08:00
Sumedh Baikady
e4d9b0c2d7 qcacmn: REO queue ref enhancement for Waikiki
In WIN BE chipsets, replace the REO tid
queue programming in FW via WMI with writing to a
Host managed table shared by HW and SW. REO HW will
pick the tid queue address from the table indexed by
peer id and tid number.

Change-Id: I8107ca5116425538329b11ae3519f02b32573bac
2022-02-02 12:06:29 -08:00
Adwait Nayak
df88a8bdc9 qcacmn: Place pktlog specific code under BE_PKTLOG_SUPPORT
Introduce a new flag "BE_PKTLOG_SUPPORT" for beryllium specific
pktlog support.

Change-Id: If91156541b322905ad5d97cf2d9d7ae687290ecb
CRs-Fixed: 3115832
2022-01-26 10:59:42 -08:00
Tallapragada Kalyan
ab28074b13 qcacmn: Access peer and its parameters only if peer_id changes
1. avoid accessing CFG parameter in per pkt path.
2. Access peer, vdev and pdev only when current peer_id
   is different from previous peer_id.
3. Avoid HKv1 and v2 checks in WDS learning path.

Change-Id: Id7fb7a29c642480f8ca58738dbb0c92130e44ecd
2022-01-24 17:00:31 -08:00
Tallapragada Kalyan
9639c91317 qcacmn: buffer replenish and reap without map and unmap
use dma_inv_range call instead of dma map and unmap
APIs during replenish and reap. This complete code is
under a compile time macro.
before change: 4160Mbps @ 96.5% (core 3)
after change: 4160Mbps @ 90.5% (core 3)

Change-Id: I61bca349a369ace06cd86f353880108cee013cb1
2022-01-20 10:01:09 -08:00
Yeshwanth Sriram Guntuka
de814c9b16 qcacmn: Trace del reg write, ce tasklet latency, tx, and rx pkts
Use the tracepoints to trace delayed register write, ce
tasklet scheduling latency, tx, and rx packets.

Change-Id: I63a89276177a9d0466dcb0c831eeb8e938a2bf79
CRs-Fixed: 3081870
2021-12-14 21:22:49 -08:00