Commit Graph

33 Commits

Author SHA1 Message Date
Neha Bisht
5e70737f80 qcacmn: Handle special descriptor cases for global tx pool
Handle special descriptor cases for global tx desc pool

Change-Id: I33253b726b1b8a2e7438b3bc1dddcac43ad8fb25
CRs-Fixed: 3592887
2023-08-30 13:40:05 -07:00
Jeff Johnson
3cbfba9824 qcacmn: Fix dp wifi3.0 documentation
The kernel-doc script identified a large number of kernel-doc issues
in the dp/wifi3.0 folder. A series of patches have addressed most of
the issues, so now fix the remaining issues. Just like in the previous
patches, there are a number of instances where public functions have
their implementation documented instead of having their interface
documented, so make sure that the interfaces are documented.

Change-Id: I4bc39b0e1a9d8c264b72ec6db76ff7e92d24f277
CRs-Fixed: 3373822
2023-02-13 18:39:57 -08:00
Amit Mehta
609446600f qcacmn: Check active peer to detect if MLO STA is connected
Currently in tx flow pool delete API to check if MLO STA is
connected, policy_mgr_is_mlo_sta_disconnected API is called.
Policy manager API takes mutex inside and flow pool delete API
can be called from soft irq context which can result in QDF ASSERT
logs.

To fix the issue instead of calling the policy manager API to check
if MLP STA is connected, loop through all the vdev peers and check if
there is any active peer. In the case of active peer defer the vdev
flow pool unmap.

Change-Id: If6338f3a060e17124950e6918039ee4cc786fee5
CRs-Fixed: 3382140
2023-02-01 22:12:17 -08:00
Srinivas Girigowda
31f0994955 qcacmn: Ignore flow pool unmap for inactive pool
If the flow pool status is inactive, then ignore flow pool unmap.

Change-Id: I53685d6031beb01bcc6f9368dc10f034cae56337
CRs-Fixed: 3322921
2022-10-28 04:58:45 -07:00
Namita Nair
5fb7638690 qcacmn: Ignore flow pool unmap for inactive pool
This change will prevent flow pool unmap and delete
if pool status is inactive.

Change-Id: I071b84c6d99360af8aba97297efacb0a8682f343
CRs-Fixed: 3306110
2022-10-27 13:25:37 -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
Prakash Manjunathappa
44ece0c600 qcacmn: Do not free Tx flow pool in case of MLO link switch
In case of MLO same adapter maps to both vdevs. Tx is done with
primary link vdev pool. In link switch case vdev0 flow pool is
deleted and traffic will continue to flow with same vdev0 flow_id
This is resulting in packets drops within the driver due non-availibilty
of flow pool.
Fix this by skipping flow pool deletion in case of STA MLO connection.

Change-Id: Ie56ea221f7f254484bd31ec4880f2155779fb513
CRs-Fixed: 3292979
2022-09-30 04:26:21 -07:00
David Oladunjoye
5c6ac7b887 qcacmn: dp: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: I443da8d7f5e1771dceb3386c4458b0da6a5e9476
CRs-Fixed: 3218236
2022-07-07 00:52:07 -07:00
Aravind Kishore Sukla
6932ea7f8a qcacmn: Replace kmsg logs to debug logs
Change kernel log level to debug level

Change-Id: Ib2736aff0f653d046d502d460f204bba2247246f
CRs-Fixed: 3182588
2022-05-10 09:11:47 -07:00
Nandha Kishore Easwaran
cf10304673 qcacmn: Add provision to set desc to higher value
Add support to change the tx_desc value to 65536. Some changes
to make the function argument as u32 type us made

Change-Id: I7cbde1b7ed4ab4e278c25c1ecfa94b7f673197f2
CRs-Fixed: 3130833
2022-03-15 03:41:58 -07:00
Surabhi Vishnoi
c62b0f215e qcacmn: Reduce the log level from error to info
Reduce the log level of tx flow control threshold pool size
from error to info. This is done to reduce the delay due to
console logging in connection/roaming path.

Change-Id: I5332bd179edc92006976a6421121cfce38b89b70
CRs-Fixed: 3119430
2022-02-04 03:31:37 -08:00
Karthik Kantamneni
e79b8799c1 qcacmn: Fix compilation error in flow control switch case logic
In flow control code switch logic break statements are not used
intentionally, but compiler is treating this as error.
So to avoid compilation error add fall through comment.

Change-Id: Ic79b75c48554182fba7c4c0f3885e3a44347e2e7
CRs-Fixed: 3090182
2021-12-13 00:45:17 -08:00
Karthik Kantamneni
fcebc684e9 qcacmn: Fix disconnection issue due to N/W queues pause
Due to DP flow control network queues are stuck in
paused state and not getting reset even after new connection.
This is causing DHCP packets to be dropped and resulting
immediate disconnection after every connection.

Fix this by properly pausing and unpausing the AC flow control
based network subqueues during disconnection/connection events.

Change-Id: I280e704d5a01b19d180c32aaa272c0cb731f8c0e
CRs-Fixed: 3078745
2021-11-29 07:34:15 -08: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
Chaithanya Garrepalli
ddc9e59e8f qcacmn: Add VDEV refcount debug support
Add debug support for VDEV refcount to take
refcount by module id and decrement corresponding
refcount with same module id

Change-Id: I15c075816994ba70155fefbc0bce208b20fb9a59
2020-08-20 10:07:32 -07:00
Chaithanya Garrepalli
a718007f03 qcacmn: increment vdev refcount for search by id
Add new API dp_vdev_get_ref_by_id() which will return vdev
pointer by holding a reference. Caller of this API has
to ensure that this reference is released by calling
dp_vdev_unref_delete() API

New lock soc->vdev_map_lock is introduced to protect
vdev id to object array

Change-Id: I883e328932e35ef31254125492dbae20cebe0e00
2020-08-20 10:07:28 -07:00
Jinwei Chen
05bd796311 qcacmn: fix invalid TX pool status when pool reattach
For AC based TX flow control, when try to do TX desc pool
reattach, currently even if TX desc pool avail_desc count
> BE_BK start threshold, it still mark pool status as
FLOW_POOL_ACTIVE_PAUSED.

Set correct pool status to FLOW_POOL_ACTIVE_UNPAUSED.

Change-Id: I6b675ffd71a2233ac23efbd6df2c235313f59cba
CRs-Fixed: 2687728
2020-05-19 22:29:20 -07:00
Yeshwanth Sriram Guntuka
6159db7efa qcacmn: Reset tx desc as part of flow pool delete
Tx desc flow pool for the vdev is not deleted as part
of disconnection due to tx_desc pending to be processed
in tx comp ring. Hdd_stop is triggered immediately after
this causing dp vdev detach. In parallel, the tx desc
from the tx comp ring is processed, wherein stale vdev
address is derefernced to get dp soc causing page fault.

Fix is to reset tx desc by setting the vdev to NULL as
part of dp_tx_delete_flow_pool and also reset count to
zero in dp_tx_comp_handler before ring desc process loop.

Change-Id: I66f718668ba84f89106d09e624d9593f89479e55
CRs-Fixed: 2683874
2020-05-15 00:36:54 -07:00
phadiman
1f3652debc qcacmn: Datapath init-deinit changes
Do a logical split of dp_soc_attach and
dp_pdev_attach into Allocation and initialization
and dp_soc_detach and dp_pdev_detach into
de-initialization and free routines

Change-Id: I23bdca0ca86db42a4d0b2554cd60d99bb207a647
2020-05-02 21:59:42 -07:00
Manjunathappa Prakash
25390a01c2 qcacmn: flow_ctrl_v2: decouple tx_desc from TCLring descs
Decouple software tx_descs from TCLring descriptors and Increase
TCLring descriptors max INI config limit to 2k to 32k.

Change-Id: I18d014cdb0c1e26b7661ff65aaa8dffe791d7163
CRs-Fixed: 2657056
2020-04-07 03:01:29 -07:00
Rakesh Pillai
dce01374cd qcacmn: cdp: Convergence of cdp_flowctl_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged flowctl_ops
- flow_pool_map_handler
- flow_pool_unmap_handler
- dump_flow_pool_info
- tx_desc_thresh_reached

CRs-Fixed: 2539812
Change-Id: I084d3878df84778622340e87bddf90acd3e669d6
2019-11-11 23:08:22 -08:00
Sravan Kumar Kairam
220755895d qcacmn: Free tx desc pool at dp flow control deinit
Currently if tx flow control is enabled allocated tx desc pools
are deleted only in tx flow pool unmap handler from control path.
So cases in which control path unable to handle pool unmap handler
leads to tx desc pool resources memory leak. To handle this free
allocated all tx desc pool resources as part of dp flow control
deinit which is done as part of soc tx detach.

Change-Id: Ib750c2ce39baf7fc5aae5f0c8cb62bc848d2f864
CRs-Fixed: 2511515
2019-10-02 02:48:25 -07:00
Varun Reddy Yeturu
83a31a34b0 qcacmn: Add debug log in dp_tx_delete_flow_pool
Add debug log in dp_tx_delete_flow_pool() to know if
all available tx descriptors have been released to the
pool or not

Change-Id: Id0684effd5c5c0b531bb2d4b3f08d929aaa85b5c
CRs-Fixed: 2463632
2019-06-12 17:46:01 -07:00
Jeff Johnson
a8edf330f0 qcacmn: dp: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within dp replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I61f3adab1208682d36235421f44a048e35df346d
CRs-Fixed: 2418258
2019-03-27 06:10:00 -07:00
chenguo
f44ac20b0c qcacmn: AC based TX flow control
Implement per access category flow control. Make sure lower AC
traffic, such as BE, will not starve higher AC, such as VI and VO,
traffic inside a single vdev.

This change is part of FR49094

Change-Id: I6aa15832eb48e8f3ada00eb29a7bc00999edaafd
CRs-Fixed: 2304436
2018-10-02 15:37:17 -07:00
jiad
331eb9e6f7 qcacmn: Fix DP flow pool map for non-LFR3 roaming
tx_desc allocation failures are observed when running roaming scenarios
on Napier x86, where roaming offload is disabled (non-LFR3) and during
roaming reassociation is sent by DUT. With Lithium_DP, tx_desc are
pre-allocated within flow pool and flow pool map and unmap are currently
hooked in policy manager when connection table is updated.

In roaming scenario, flow pool is created when STA is associated with old
AP. But new flow pool is not created but is reused with old AP since same
flow pool id is passed from protocol stack. When old AP is removed from
policy manager connection table, flow pool is thus unmapped which leads to
EAPOL packets transmit failure due to unavailability of tx desc.

Fix is to increate pool_create_cnt to avoid flow pool being unmapped.

Change-Id: Ia912c1d7fe8319bece00869a9a47c8a760b17e2f
CRs-Fixed: 2287284
2018-08-14 20:02:32 -07:00
Aditya Sathish
ded018e406 qcacmn: Clean up dp component prints
Clean up datapath component prints by correcting trace levels for
regularly occurring prints and removing newlines from converged
print APIs since qdf_trace_msh appends them by default.

Change-Id: Ie8fe319fcb737720f7400a165e134b6a18bd15b5
CRs-Fixed: 2243843
2018-08-10 18:11:21 -07:00
Manjunathappa Prakash
e6aba4f65f qcacmn: Add DP callbacks for flow_pool create and delete
Current lithim_dp flow pool created in wma_vdev_start, wma_vdev_start
is called for same vdev multiple times for vdev. This leads to creation
of multiple flow pools for each vdev. Instead create from policy_manager
when session become active.

Register flow pool create/delete callbacks with policy manager.
So that lithium_dp vdev flow pools are created/deleted when vdev
become active/not-active.

Change-Id: Iaf6aaece47c79c7e6f7745feaee35a6bc5cd1297
CRs-Fixed: 2231601
2018-06-06 05:49:26 -07:00
Jeff Johnson
e71b8c4019 qcacmn: dp: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: Id6b2e4758232355b0c47bf8c2f1a0b2a1eacba05
CRs-Fixed: 2230684
2018-05-18 02:17:24 -07:00
Manjunathappa Prakash
612594a523 qcacmn: Do not mark pool id as INVALID_FLOW_ID in unmap
In flow control V2, dp_tx_flow_pool_vdev_unmap marks flow_pool_id as
INVALID_FLOW_ID. To free descriptors inside pool dp_tx_desc_pool_free
uses flow_pool_id to get hold of pool.

Change-Id: I892052055b34638a1ba876fac6bfcd2ae3b0d5b3
CRs-Fixed: 2228943
2018-05-02 08:30:20 -07:00
Manjunathappa Prakash
38205cc1b7 qcacmn: Create flow control pools on vdev start
As many as 5 vdevs can be created, which is defined by MAX_SME_SESSIONS.
But flow control pools are only valid for active TxRx capable vdevs.
which is 3 active vdevs. So attach flow pool creation to vdev_start
instead of vdev_attach.

Change-Id: I137676ba618aa3a6684c7d17ef7d9263c4df6efe
CRs-Fixed: 2220079
2018-04-17 13:17:49 -07:00
Paul Zhang
66698093e1 qcacmn: fix spinlock paring issue
spin_lock/spin_unlock is not pairing.

Change-Id: Ib2cb73f542deee8bf4217daa731af49d07eaf7be
CRs-Fixed: 2105081
2017-11-01 13:17:26 -07:00
Manjunathappa Prakash
ced7ea6cf2 qcacmn: Add changes for Napier flow control
Adds support for flow control on convergence branch.
Allocate Tx descriptors dynamically when vdev comes up.
Tx queue is paused and unpaused internally in host based on the
stop and start thresholds.
Changes are added under compilation flag QCA_LL_TX_FLOW_CONTROL_V2.

Change-Id: I0ccb80b0099f39efad52ccd7d47f2709fdee2a93
CRs-Fixed: 2040457
2017-07-18 23:35:05 -07:00