Commit Graph

424 Commits

Author SHA1 Message Date
Chaithanya Garrepalli
be02a2d44f qcacmn: Add stats for new TQM release reason on BE
Add Tx completion stats for TQM release reason added
for BE

Change-Id: I7d28cbfacd1378982c5cf9a3f2cf3cffa070ee87
2022-02-23 08:37:16 -08:00
Pavankumar Nandeshwar
1bf15a02b7 qcacmn: Ignore peer if it is missing txrx_peer in reinject path
Ignore peer if it is missing txrx_peer in reinject path while
going through the peer_list. This condition can hit when the
peer_setup call from the control path is not yet received for
the peer.

Change-Id: Ie57d07353f33749a439415d808fc010702c3c884
CRs-Fixed: 3130821
2022-02-21 22:41:41 -08:00
Pavankumar Nandeshwar
9979d1a189 qcacmn: Initialize txrx_ref_handle for whunt bypass
Initialize txrx_ref_handle for whunt bypass,
Which is complaining use of uninitialized txrx_ref_handle,
as it is not able to detect that txrx_ref_handle is
populated from another API.

Change-Id: I0f69cf4c8442a5655559622a5825d7af35b9ae5e
CRs-Fixed: 3127788
2022-02-11 04:13:31 -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
Neha Bisht
8fb88793e5 qcacmn: Add intra-bss check for NAWDS in tx path
In NAWDS, if ast for self bridge is present in AST table,
then the mcast arp frames are getting dropped if peerid
for nawds peer is matching ast peerid of self bridge.
To fix this, add intra-bss check for NAWDS in tx path.

Change-Id: I6f1b44634536c558520aaf0bd0c0155c4b2a4e28
2022-02-08 07:44:46 -08:00
Srinivas Girigowda
1cd2285eca qcacmn: Extract tx complete status based on CDP_ARCH_TYPE
For the non standard htt tx completion, extract the tx completion
status based on the CDP arch type.
For Lithium based architecture, use HTT_TX_WBM_COMPLETION_V2
For Beryllium based architecture, use HTT_TX_WBM_COMPLETION_V3

Change-Id: I050e8a144d72c2a9fcb6174c690c38c4e2c88c25
CRs-Fixed: 3119153
2022-02-07 17:56:53 -08:00
Neha Bisht
ebf445a844 qcacmn: Avoid use of map and unmap API in simple path
Add qdf wrapper for dma_clean_range and avoid use of DMA
map/unmap APIs in Tx. simple fast path.
Gain of ~150 Mbps is observed while running 4 radio traffic.

Change-Id: I0e96bfee43fe810da8c861cb0f4535fb0ba7f6f7
2022-01-25 03:21:47 -08:00
Yeshwanth Sriram Guntuka
8e11d1a8fb qcacmn: Add frag dma unmap handling for SG packets
DMA unmap for scatter gather packets is done using
only frag0 dma address and the entire packet length
which will lead to incorrect behaviors. Add handling
to do dma unmap for all the fragments of SG packets.

Change-Id: I614553d9f96c573f0095c9be38706fd4ac3223ab
CRs-Fixed: 3112424
2022-01-22 09:53:24 -08:00
Ananya Gupta
940984c6a6 qcacmn: Check for tx desc leak or corruption
Tx descriptor is not being freed and put back in tx desc
pool for a long time. As a result, system is not going
into suspended state.
To find this descriptor, during dp_bus_suspend and
dp_runtime_suspend, parse through the descriptor pool to
check for any descriptors not freed for a long and trigger
self recovery when found.

Change-Id: Id97c5c8537c9bec922f4e254b5bf094505ee61ff
CRs-Fixed: 3109868
2022-01-21 11:42:27 -08:00
Amrit Sahai
dd6932077d qcacmn: Add support for retry counters
add support to account for msdu retry counters in per pkt
Tx completion path

Change-Id: Icd9d90a40d0c3f50ffdba7c4e30731eec0e825c0
2022-01-20 11:04:21 -08:00
Neha Bisht
657ceed6e5 qcacmn: Fix QUIC Copyright Year Markings
Fix QUIC Copyright Year Markings

Change-Id: I7297986e56af0b396fc92f0a7b98fb47d0feec42
2022-01-19 05:39:30 -08:00
Aakanksha Doda
d92a7a0776 qcacmn: Fix issues with rdkstats
The following issues are fixed with this change-
1. Sojourn stats were printing incorrect values
2. RSSI values were junk numbers

Change-Id: Ibed73cf370a309bf9db5baad37a0e8261c58463b
2022-01-12 05:34:00 -08:00
Neha Bisht
15b88ae15e qcacmn: Prefetch Tx HW desc, SW desc and SKB in pipeline fashion
Prefetch TX HW desc, SW desc and SKB in pipeline fashion in Tx.
completion path.
This improves the UDP DL CPU idle% by ~4.5%

Change-Id: I48096e996cd835321ce2681d3981fa94c7189f54
2022-01-08 06:09:15 -08:00
Jianmin Zhu
326f1015bc qcacmn: Add mpdu tx retries stats
Customer reported their HLOS LTE-WLAN transition algo sometimes go wrong
for wrong low layer stats, Txretry delta is bigger than Txtotal delta.
Txretry unit is msdu while Txtotal unit is mpdu.

Add vdev/peer stats for mpdu number of successfully transmitted after
more than one retransmission attempt, to align mpdu tx_packets, tx_failed.

CRs-Fixed: 3099490
Change-Id: Id4b9d8fd81af4bf0c141dad481bfd2b3f6c1db2a
2022-01-04 02:53:18 -08:00
Neha Bisht
631d7e1a7d qcacmn: Prefetch tx desc and nbuf in lithuim Tx. send path
Prefetch tx desc and nbuf in lithuim Tx. send path.
This improves the UDP DL CPU idle% by ~1.5%

Change-Id: Ibd31d979c859824ed9f6b34a2685f8b9c4a7635d
2022-01-03 04:54:13 -08:00
Chaithanya Garrepalli
2c1ccc9baf qcacmn: Fix NAWDS mcast loopback issue in intraBSS
For NAWDS intraBSS mcast traffic add check for SA
and DA peer to avoid loopback

Change-Id: Ifb987dbfe6d6f427cd8873315d4ffd67390b4e6f
2022-01-03 01:03:59 -08:00
Sai Rupesh Chevuru
90b1e60e57 qcacmn: Upgrading to htt_tx_wbm_completion_v3
Due to overlap with WBM block in QCN9224,
upgrading to htt_tx_wbm_completion_v3.

Change-Id: If6f7fd64686c9c1b35b253930e7918f570bd547c
2021-12-22 10:43:58 -08:00
Sai Rupesh Chevuru
b43e679a58 qcacmn: Multicast support for MLO
Multicast support for MLO
1. Following functions are newly added.
	dp_rx_igmp_handler()
	dp_tx_mlo_mcast_handler_be()
	dp_rx_mlo_mcast_handler_be()
	dp_mlo_get_mcast_primary_vdev()

Change-Id: If215f843369e6e2621ef302b924e524c86f0d30b
2021-12-16 05:35:30 -08:00
Yeshwanth Sriram Guntuka
454c7361e1 qcacmn: Check for system PM state before SW2TCL HP update
In SAP mode, intrabss forwarding can happen when system
suspend is in progress. This could potentially result in
a scenario where SW2TCL HP update goes through after
WOW_ENABLE command is sent to FW.

Fix is to check for system PM states and do an explicit
system wakeup if tx packet gets enqueued to SW2TCL after
wow is enabled. Flush the SW2TCL HP on system resume.

Change-Id: I8dcd108b0dc1d703168f2f7a0ef0627e4dc0b103
CRs-Fixed: 3087727
2021-12-15 07:39:59 -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
Yeshwanth Sriram Guntuka
eb82e858a6 qcacmn: Avoid possible NULL pointer dereference of msdu_ext_desc
tso_desc is assigned to msdu_ext_desc in dp_tx_prepare_desc
for TSO packet even before msdu_ext_desc is configured which
could result in NULL pointer dereference.

Fix is to set the tso_desc and tso_num_desc in msdu_ext_desc
post dp_tx_prepare_ext_desc.

Change-Id: I62279c94ea7037b3f6a92644ae7eb6a5e63631f6
CRs-Fixed: 3083846
2021-11-30 07:14:48 -08:00
Harsh Kumar Bijlani
66e66d88d7 qcacmn: Tx stats changes for BE HW vdev stats
Following peer stats are updated in per packet Tx completion path:
    comp_pkt: Pkt Info for which completions were received
    tx_failed: Total Tx failure

In BE architecture, HW provides the support for basic vdev stats and
hence per packet stats updation of above parameters can be done only
when enhanced stats is enabled or HW vdev offload stats is disabled.

Avoiding per packet stats updation reduces CPU load and improves KPI.

Change-Id: I7090d1a1ce0a882236e3310e3e9517149cbb146b
CRs-Fixed: 3067843
2021-11-30 00:57:59 -08:00
Neha Bisht
9a2423839d qcacmn: Move tso fields in extended desc structure
Move tso fields in msdu_ext_desc structure from dp_tx_desc_s structure

Change-Id: I0cbd366ece753fc4266e08538f30b255ccdc0bd1
2021-11-26 06:35:23 -08:00
Neha Bisht
7981ef5007 qcacmn: Avoid CCE check in per packet path
CCE disable was done for 8074 V1 specifically which is no longer
needed for future releases and hence removing CCE check in TX.
per packet path

Change-Id: Ia31c5e2cb181e4a3409fa1f1abce8c55524b1b05
2021-11-25 02:52:31 -08:00
Sai Rupesh Chevuru
30c0b8b4cd qcacmn: Potential memory leak in dp_tx_process_htt_completion
In dp_tx_process_htt_completion(), when vdev is NULL,
returning without freeing nbuf and tx_desc.

Change-Id: I234f0a4f710cc9eb0fc5431fb26a1846326fd931
2021-11-19 03:22:01 -08:00
Shikha Bakshi
eaf287ec84 qcacmn: Avoid updating tid for non-mscs station
Check of Invalid QOS tag which can be set for non-mscs clients
connected on same VAP as MSCS clients. TID override needs to be
avoided for those clients

Change-Id: I651a354e740fe6aee74f94b59ac2e6f154a80c6d
2021-11-15 20:37:26 -08:00
Pavankumar Nandeshwar
e3d4f6b095 qcacmn: remove mec_fw_offload assert
remove the assert when HTT_TX_FW2WBM_TX_STATUS_MEC_NOTIFY
is received and mec_fw_offload is enabled.

Change-Id: I1b9c876822e3e9c05b5035af82afa484106e880a
2021-11-13 00:22:22 -08:00
Amit Mehta
8410d24e7b qcacmn: Remove csum_enabled flag and related changes
As part of code change we are removing csum_enabled flag check.
In that case, csum_enabled becomes redundant since we are not using it
in the code base, So remove redundant code as part of the cleanup.

Change-Id: Iac411b20f06436053b1969a1af9e3b3ee418c34c
CRs-Fixed: 3070858
2021-11-12 11:32:48 -08:00
Mohit Khanna
2c4ac431f0 qcacmn: Avoid tracing packets at high throughputs
Avoid tracing data packets at high throughput levels. This helps save
CPU cycles.

CRs-Fixed: 3059712
Change-Id: Ideca04e142a2f4080cd5758fe27f0b526ea4f9ad
2021-11-08 05:19:51 -08:00
Mohit Khanna
9d2cde1128 qcacmn: Add last TX/RX timestamp in DP peer stats
Add timestamps for last TX/RX in peer stats. This stat is needed to be
passed on to upper layers on demand.

CRs-Fixed: 3059712
Change-Id: If0d8b7dc3c139e4d1b670bf98f3f574f02ea9715
2021-11-08 05:19:46 -08:00
Mohit Khanna
81e29163db qcacmn: Add throughput based RTPM API support
Add support to invoke HIF runtime PM APIs in TX packet path based on
throughput level. Essentially at high throughputs, where runtime PM is
not expected to provide power gains, invoking the APIs is deterimental to
performance.
Hence invoke runtime_pm APIs based on throughput level.

CRs-Fixed: 3059712
Change-Id: I49d111bffa8a37c68abbdd54911f9ecc22430562
2021-11-08 05:19:41 -08:00
Amit Mehta
9cf3f44770 qcacmn: Update MPDU retries in case of successful transmission
In case of successful transmission If MPDU tx
is retried more than the threshold then
increment MPDU retry count by transmit_cnt / threshold

Change-Id: Idbc7e2d0579ff68e272132fe4ffe9f951c4aacf5
CRs-Fixed: 3058464
2021-10-29 10:23:17 -07:00
Rakesh Pillai
57e2c01e5e qcacmn: Peer id parsing changes for beryllium
Take care of the MLO peer bit indication to be
concatenated with peer_id to access the peer map
object.

Change-Id: Ia603a728101e83829a8906d1b847f42389e78ca6
CRs-Fixed: 3039326
2021-10-15 13:13:27 -07:00
Chaithanya Garrepalli
3c3e5709ac qcacmn: Increse num TX rings for QCN9224
This change includes below
1) Changes needed to increase Tx rings to 4
2) Use WBM2SW4 ring for rx error in QCN9224
3) memset srng at alloc to avoid populating RBM_id
in per packet path and enable implicit RBM

Change-Id: Icbd5ac2378273b8f3c6adc41c611e29551fff22f
2021-10-13 13:12:19 -07:00
Chaithanya Garrepalli
60db195327 qcacmn: Change to route vdev_id exceptions to FW
Configure HW to route vdev_id mismatch exceptions
packets to FW.

Change-Id: I8baf4a2f299ddda253a9cd3c247054a0e546af23
2021-10-11 04:51:39 -07:00
Yu Tian
112813c1b7 qcacmn: Add API to get TX pending in WoW state
This change is used to provide an API for PMO module to
check whether there are pending TX frames before HOST sends
wake up indication to FW. PMO module uses this to indicate
FW whehter to discard HWDTIM.

Change-Id: Icc3271e87e376e3313fddc5f4f99e39daeaf6af7
CRs-Fixed: 3046947
2021-10-11 00:30:47 -07:00
Pavankumar Nandeshwar
851b1f68c0 qcacmn: enable MEC support for Beryllium
The multicast echo check feature is moved to hardware in
Beryllium. Enable this hardware feature and also disable
the MEC handing code for Beryllium in the host.

Change-Id: I86d319963191f3ed77aba16dcccbc659906edd9f
2021-10-01 15:18:25 -07:00
Pavankumar Nandeshwar
6b1d142d98 qcacmn: Enable wds changes in Beryllium
wds in Beryllium is managed by hardware.
Make use of hardware managedwds and disable
the corresponding wds handling done in host
for Beryllium.

Change-Id: I39f23cb40c6c5f85ada8ce59c92ff2855bb18da3
2021-09-30 15:15:25 -07:00
Harsh Kumar Bijlani
87edde8b30 qcacmn: Do not populate meta_hdr on Tx completion path for mesh mode
Do not populate the struct meta_hdr_s into for buffers received on
Tx completion path when operating in mesh mode.

Also update the fields in tx_capture_hdr as per the new definition.

Change-Id: I6150b4ce891ca73d5ed7c7620568606c377223c6
2021-09-22 00:57:22 -07:00
Yeshwanth Sriram Guntuka
ccb6664db1 qcacmn: Dump flow pool stats as part of periodic stats display
Dump flow pool stats even for low verbosity level as
part of periodic stats display.

Change-Id: Iea59d20b0a81cfd0bfdac65ad54a11fa33f30f2f
CRs-Fixed: 3031168
2021-09-13 13:04:58 -07:00
Harsh Kumar Bijlani
a7e391e49f qcacmn: Remove WDI event WDI_EVENT_UPDATE_DP_STATS from per pkt path
WDI event WDI_EVENT_UPDATE_DP_STATS is triggered for updation of peer
stats from both per packet and monitor path wherein per packet path is
applicable for MCC and monitor path is applicable for WIN.

Trigger for this event is flag protected under the macros
FEATURE_PERPKT_INFO and WDI_EVENT_ENABLE.

FEATURE_PERPKT_INFO is not defined for MCC.
With this, WDI event in per packet path is not triggered and hence unused.
Make changes to remove the unused code.

Change-Id: Ibcb0948b0ecae313270b6a173e243b2f27f1bbee
2021-09-08 14:55:32 -07:00
aloksing
ca013a2078 qcacmn: Add enhanced stats flag
Add enhanced stat flag in dp pdev to make independent of monitor ko

Change-Id: I6da989db54829e28ce680fc9671eb9b866e4b2b1
CRs-Fixed: 3020454
2021-08-31 05:39:42 -07:00
Chaithanya Garrepalli
49e18cfe2a qcacmn: DP Tx changes for QCN9224
Changes for DP tx for QCN9224

Change-Id: I7010aef55dc6e8bedfa1c44fe6baa1baa55c32c9
2021-08-13 12:04:02 -07:00
aloksing
b158abe417 qcacmn: API renaming for monitor module
Add prefix dp for all monitor APIs
Add mon_debug/mon_info/mon_err for logs

Change-Id: I71d49f6bcacd77f5695269817fed83337169227b
CRs-Fixed: 3006497
2021-08-12 05:32:47 -07:00
Harsh Kumar Bijlani
43da5b8892 qcacmn: Add API for unmap with physical and virtual addr of nbuf
Tx data transfer in host mode with nbuf map_unmap debug frmwk
enabled and enhanced stats disabled results in an assert.
This is because on Tx completion path, nbuf unmap is done using API
qdf_mem_unmap_nbytes_single which takes physical address of nbuf
for unmap and does not remove nbuf from map_unmap tracking list and
when nbuf is freed, it results in assert as the tracking list still
contains that nbuf entry.

In order to fix this, define a new API for nbuf unmap passing physical
and virtual address of nbuf as arguments. Physical address is passed
as an argument in order to avoid cache miss in per packet path which
eventually helps in improving the KPI.

Change-Id: I77ab6ac3ac98556b9caff8aa3ee82bc23cd26de7
CRs-Fixed: 3006671
2021-08-09 22:25:29 -07:00
Chaithanya Garrepalli
386738a312 qcacmn: fix the tx desc leak issue
Fix the tx desc leak issue in case of hw enqueue failure
with ME and TSO

Change-Id: Id142a3522ec6c9e25d2cc19f373e1a92de425e5a
2021-08-04 18:04:28 -07:00
aloksing
53fe7000ba qcacmn: Move monitor related fields from soc/pdev to mon_soc/mon_pdev
PATCH[6/7]:
This patch consists following changes:
 -Move monitor related pdev variables to struct dp_mon_pdev
 -Move monitor relted soc variables to struct dp_mon_soc
 -Move cookie to monitor link desc va to monitor file
 -Add APIs to access monitor related variables
 -Add dummy APIs to build without monitor support.

Change-Id: I032a480b1383d061f984cee3ba6b10ac7a0ff350
CRs-Fixed: 2983781
2021-07-30 21:51:21 -07:00
aloksing
e7cc727374 qcacmn: Move core monitor and monitor dependent feature func
PATCH[4/7]:
This patch consists following changes:
 - Move core monitor and monitor dependent feature functions
   to monitor file
 - Move enhanced stats functions from htt to monitor file
 - Move vdev set monitor mode rings function to monitor file
 - Create and initialize relevant funct ptrs
 - Initialize cdp monitor related ops.

Change-Id: Iac1ab43eb1c4b98bd21bbb8a5741ee53034da2f1
CRs-Fixed: 2984635
2021-07-30 21:51:12 -07:00