Wykres commitów

243 Commity

Autor SHA1 Wiadomość Data
Yu Tian
60d9ef02ec qcacmn: Add verbose log for RX frame dropping
Now only error counter is present in normal
datapath RX frame dropping. This change add
verbose log for easy debug.

CRs-Fixed: 3706290
Change-Id: Iae2fb9f6100109173921c4f1d43258a0722dc0de
2024-02-19 20:15:26 -08:00
jinbao liu
b4f2073ac3 qcacmn: Optimize rx reorder queue setup
This change optimizes rx reorder queue setup by using
tid_bitmap, which contains a group of tids, to set up
multi tids at a time instead of one tid after another.

Change-Id: I161b0c812c436ef79d2d1db693b8d0ac41505878
CRs-Fixed: 3661593
2023-12-08 15:22:17 -08:00
Rakesh Pillai
d149d2a2e8 qcacmn: Do not unmap buffer if MSDU done is not set
Currently if the msdu_done bit is not set in the
rx_pkt_tlvs, the buffer is unmapped and freed.
There was an issue seen where hardware accessed a
buffer address, which probably was delivered to driver
without DMA of data to the buffer (thereby unmapped
and freed before hw attempted second access). This
results in unwanted recovery.

Based on the above hypothesis, add a workaround
to skip the unmap-and-free of any buffer for which
the msdu_done bit was not set in the rx_pkt_tlv.
Also mark the corresponding rx_desc as in_err_state.

The rx_desc corresponding to such aforementioned
msdu_done failure msdus are stored in a rolling
list, where the old entry is force unmapped & freed
when a new entry needs to be added. This force
unmap-and-free of the oldest buffer gives an uncertain
amount of delay between it being reaped from rx ring and
actual unmap-and-free.

Change-Id: Ibf8f3c886118d532af818466cb46218d88146271
CRs-Fixed: 3667674
2023-11-28 04:08:22 -08:00
Rakesh Pillai
8f913be763 qcacmn: Save paddr of the prev buffer attached to rx descriptor
One instance of an issue was observed, where there's an
SMMU fault due to an access to paddr, which has been unmapped,
but is shown as active/mapped from the rx_desc data.

Save the paddr of the previous buffer attach to the rx
descriptor to aid in debug. This is to confirm if the
paddr has got updated after the last replenish.

Change-Id: Ib8318883b273be8b722cefec16d18b45daf679a7
CRs-Fixed: 3642902
2023-11-03 10:09:01 -07:00
Chaithanya Garrepalli
47296136e3 qcacmn: replenish complete rx_refill ring in UMAC reset
In case of UMAC reset if in_use buffers are sufficient
to fill complete RX refill ring we are replenishing
only 1/3rd ring at pre-reset.

In case of low threshold interrupts disabled ring might
be never refilled. At post reset refill complete ring.

Change-Id: I0e4ed942120619ef357bc91f8cbbab8c1fd1b06e
CRs-Fixed: 3628996
2023-10-10 07:08:30 -07:00
Jinwei Chen
e0d7d004e0 qcacmn: Set skb's ip_summed to CHECKSUM_NONE if checksum failure
Only if both IP and TCP/UDP checksum passed for TCP/UDP
packets, then set ip_summed to CHECKSUM_UNNECESSARY,
otherwise set it to CHECKSUM_NONE.

Change-Id: Ic4973e32d622f66830dbd7a5bc03012cf6dd87bf
CRs-Fixed: 3626292
2023-10-01 12:36:36 -07:00
Gaurav Saini
b64de0cf4a qcacmn: Handle RX exception from IPA on WDS-EXT netdev
When WDS_EXT feature is enable, Host needs to redirect
the data packets to WDS extended netdevice.

Change is added the support for forwarding the RX packets
when received from IPA as an exception by deriving the
correct netdevice interface.

Change-Id: I083a1acc72023f3ebe6ea36ec05a5706f89c16bc
CRs-Fixed: 3597357
2023-09-21 17:57:45 -07:00
Namita Nair
429dc9c9e6 qcacmn: Ensure rx_desc->unmapped is set to 1 before releasing lock
Originally Change-Id: I9fa71bdb6d4e4aa93fc795cc5dd472a181325991
was brought in to fix a race condition between Rx buffers
map/unmapped in dp_ipa_handle_rx_buf_smmu_mapping() and at the
same time map/unmapped from dp rx replenish context.
The fix ensured that rx_desc is unmapped and rx_desc->unmapped=1
flag will be set atomically within a lock.

But Change-Id: Iadb40071fb733cc4de3291784df5075d5a099a8e
introduced a flaw by releasing the lock before setting the flag to 1.

This is currently causing race condition and causing double
unmap calls when IPA smmu pool unmap and dp_rx_replenish unmap
is running in parallel. This change will fix this issue, by setting
the flag before the lock is released.

Change-Id: I3533bb5f6cc0437395149cd3c718826ef0b482a3
CRs-Fixed: 3594252
2023-09-15 21:09:32 -07:00
Namita Nair
8de279eab8 qcacmn: Handle ipa_mapped flag correctly to prevent race
Currently soc->ipa_mapped flag is set to true only after all
the buffers are SMMU mapped to IPA. This leads to a race
window where Rx buffers routed to WLAN HOST in the replenish
path are not mapped to IPA, as the ipa_mapped flag is still
set to 0. The fix is to set the ipa_mapped flag to 1, right when
the IPA pipes are enabled, before waiting for the complete
buffer pool to be IPA SMMU mapped.
With this fix, RX buffers can be unmapped and mapped to IPA
domain in dp_pdev_rx_buffers_attach() and
dp_pdev_nbuf_alloc_and_map_replenish() in WLAN host RX path when
ipa pipes are enabled.

This change also renames ipa_mapped flag to ipa_map_allowed.

Change-Id: Ibbe50cb211f858a3372e31644df2f5e98f99a292
CRs-Fixed: 3569745
2023-09-15 21:09:22 -07:00
Amit Mehta
fcf4ae51f3 qcacmn: Add changes to update band info in nbuf cb
Add changes to update band info into nbuf cb for
connectivity logging.

Change-Id: Iec5e91fe6b39a9a0f8a7a37d4945914d7a9e748f
CRs-Fixed: 3571823
2023-08-25 18:06:06 -07:00
Venkateswara Naralasetty
b5028a76d4 qcacmn: Enable interrupts on RXDMA MONITOR STATUS ring for wcn6450
Enable interrupts in monitor mode for wcn6450.
Interrupt configuration related code is moved from dp_main.c file to
dp_rings_main.c file as part of 'Ie58eae34a2da77c2d63870fab74b9d2d9d49c14a'
as Evros does not use dp group interrupts.

Move back the interrupt configuration related code from dp_rings_main.c
to dp_main.c  to enable interrupts in monitor mode for wcn6450.

Change-Id: I7a3cbbe905072dad1cf38799ac6ef441281f78f9
CRs-Fixed: 3565734
2023-08-25 03:03:23 -07:00
Venkateswara Naralasetty
c62ef80144 qcacmn: Change number of RXDMA_STATUS_RING allocations
Currently two RXDMA_STATUS rings are allocated for the station targets
irrespective of whether DBS supported or not. Only one RXDMA_STATUS_RING
being used for non-DBS targets like QCA6750 and WCN6450, hence change
the number of RXDMA_STATUS_RING allocations to 1 for non-DBS targets.

Change-Id: I4f14c8b5cee892979765f776b37d44e99ba2d558
CRs-Fixed: 3578733
2023-08-16 13:37:11 -07:00
Karthik Kantamneni
c88b38afa1 qcacmn: Fix RBM id assignment for Rx buffers in Rhine
Currently RBM id is not assigned properly for RX buffers
in Rhine architecture. Fix this by assigning RBM id during
soc attach in Rhine.

Change-Id: I8f3a781bfaf81366417107f4bd3da61b142ca1e2
CRs-Fixed: 3573342
2023-08-01 20:30:36 -07:00
Namita Nair
b50ceeee79 qcacmn: Defer IPA SMMU mapping to OPT_DP reserve
Currently, IPA SMMU map/unmap is called as part
of init. This causes every nbuf to be mapped
to IPA in the Rx path, causing throughputs
to drop. This change resolves the problem by
deferring the IPA SMMU map/unmap
call to OPT_DP filter reserve/release, as
nbuf needs to be mapped to IPA only in this scenario.

Change-Id: If198a6c5f22af58fdaf9d9c020c74b1f76002e37
CRs-Fixed: 3496679
2023-07-04 22:36:13 -07:00
Zhiwei Yang
eb95c8b60f qcacmn: Correct spelling errors
Correct spelling errors
s/QCA_PADDR_CHECK_ON_3TH_PLATFORM/QCA_PADDR_CHECK_ON_3RD_PARTY_PLATFORM

Change-Id: I92e22fb116e4505c43c604a86a90ed507a277ef4
CRs-Fixed: 3462780
2023-05-29 20:44:02 -07:00
Amit Mehta
34497ea2d1 qcacmn: Add changes to get link ID in Tx/Rx Path
Add changes to get link ID in Tx/Rx Path

Change-Id: I6b52093697b138e5a5d3878af2dd8db0d65cc488
CRs-Fixed: 3450541
2023-05-28 09:28:46 -07:00
Kenvish Butani
0df4b5eaea 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: I1c9e6e767bbf6565567d998ae8e1357398de5803
CRs-Fixed: 3486304
2023-05-24 05:19:41 -07:00
Srinivas Girigowda
ce736a1d8d qcacmn: Rearrange the functions to appropriate files
Rearrange the functions to appropriate files based on TX and RX 2.0.

Change-Id: Ie8e562a7aecdc91257210b55a323dfe47e67878c
CRs-Fixed: 3427296
2023-05-10 11:49:36 -07:00
D Harilakshmi
82bd3d9009 Revert "qcacmn: Optimize DP Rx Error Handling (Part-2)"
This reverts Change-Id:	I760694073a06c1829f28e7e92cd1657560d8eb06

Change-Id: If1573653da912702bd343acfa42f9ae32a3f7844
CRs-Fixed: 3472220
2023-04-26 06:39:59 -07:00
D Harilakshmi
2fa83cedbc Revert "qcacmn: Correct spelling errors"
This reverts Change-Id: Id33b5f250a0c44f475b3463f9a6a68f83b47b6cd

Change-Id: I54057d65091b445240a53f2d8d34cd73ca61d860
CRs-Fixed: 3462780
2023-04-25 12:08:25 -07:00
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