提交線圖

42 次程式碼提交

作者 SHA1 備註 日期
Debasis Das
721fccdad5 qcacmn: For me pkts, unmap buffer that holds dest mac
Before freeing me packets, the buffer holding the dest mac
address must be unmapped.

Change-Id: I551666efb0a17245d7d654cdf362a470410ceda4
2020-09-15 16:01:18 -07:00
Chaithanya Garrepalli
926912fe86 qcacmn: store vdev_id in tx desc instead of vdev pointer
In tx desc store vdev_id to avoid unprotected access of
vdev memory.

In tx path pass VDEV as argument to all APIs

In completion path get vdev from peer as vdev reference
in peer is protected with reference, in places where peer
is invalid get vdev object using vdev_id stored in tx desc
with a reference count

Change-Id: I364ebb51143218872c0bc6f856772ab1df00bb17
2020-08-21 11:42:28 -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
Chaithanya Garrepalli
bd70ec6350 qcacmn: Rearrange fields in dp_tx_desc to avoid padding
Current dp_tx_desc structure size is 136 bytes,
re-arranged the fields to fit in exactly 128 bytes to
align with number of descriptor per page and page offset
bit maps

Also add a compilation assert on tx desc size

Change-Id: Ifcb18a9da637cb71c0427b56ad4054d2206ddfbb
2020-07-01 00:26:16 -07:00
Rakesh Pillai
0f5a52c0f6 qcacmn: Deinit tx desc pool before freeing the pool
Currently when the last tx descriptor in any descriptor
pool is freed, it will also free that particular tx
descriptor pool. But before freeing the tx descriptor
pool, the pool is not marked as inactive.
Due to this, the next time when the tx descriptor pool
is tried to be allocated, since its not inactive, the same
pool is reattached, but without any memory allocated.

Deinitialize the tx desc pool before freeing it, to make
sure that the tx descriptor pool status is marked as
inactive when the decriptor pool memory is freed.

Change-Id: I52d792d115d215561c72f203abef6d327d126c01
CRs-Fixed: 2680397
2020-05-15 10:41:55 -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
Radha Krishna Simha Jiguru
41c0716617 qcacmn: Add a change to do fast transmit completion
Lot of checks in Tx completion path are for special handlings
such as when ol stats are enabled some protective debug checks etc..
Add a logic to fast free of buffer at transmit completion.
If extended stats not enabled(Typically needed for enterprise cases)
do the buffer free faster. This is controlled through a flag.

Change-Id: I04873b5e3643d8e93e5b248fcaf23504dcb7624f
2020-04-30 01:51:07 -07:00
Jingxiang Ge
e7d41574f3 qcacmn: Add dbgid for each runtime put/get
This is to enhance statics for runtime put/get, which is
to detect if there is mismatch for usage_count.

Change-Id: I24cddb9d10e4cb675c8375cbd0f589c7718bd680
CRs-Fixed: 2647972
2020-04-07 01:20:41 -07:00
Radha Krishna Simha Jiguru
351cdfe15f qcacmn: Clean up dp_tx_desc_alloc and dp_tx_desc_free API
Clean up dp_tx_desc_alloc and dp_tx_desc_free API to avoid array
dereferencing multiple times.

Change-Id: If84721cb2c6fe023d8008a97859bc88421b58e94
2020-03-24 02:42:09 -07:00
Jianmin Zhu
7ec8548fe6 qcacmn: Fix uninitialized parameters in cmn
fix uninitialized parameters in cmn

Change-Id: Ice6e9ab0a337de04a693615c607f0d5c4019defe
CRs-Fixed: 2559018
2019-11-17 01:39:35 -08: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
Amir Patel
5dc47f56dc qcacmn: Move multicast enhancement feature out of common code
Move WIN specific multicast enhancement feature API/data
structure outside common code

Change-Id: I35b10d61bd969a4ab6a864a55dd215049981c0c9
2019-06-07 03:23:56 -07:00
Jinwei Chen
79b4fc80bf qcacmn: Fix TX Desc invalid accessing when process TX completion
In some corner case, host has done Vdev destroy and TX desc flush
since there is pending outstanding TX data on this vdev, but later
FW/HW still indicate the TX completion to host and which likely
these TX completion get delayed, conflict happened due to same TX
Desc accessing.

To fix it:
(1) Only reset TX desc Vdev to NULL in dp_tx_vdev_detach().
(2) Do more enhancement in dp_tx_comp_handler() to avoid
    invalid Vdev accessing.
(3) Do TX desc flush in dp_tx_pdev_detach().

Change-Id: I44cce9451e4f07fed6e21a9cd3fc0eaefa3d54c2
CRs-Fixed: 2441455
2019-05-20 13:40:48 -07:00
Mohit Khanna
6d22eeb468 qcacmn: Tx desc alloc: remove default wakeup action
When the status is FLOW_POOL_ACTIVE_PAUSED, all queues are expected to
be paused. Still some on the fly packet can make it to the driver. In
such a case, the function dp_tx_desc_alloc takes a default action of
WLAN_WAKE_NON_PRIORITY_QUEUE. This is incorrect, since it will wake all
non priority queues, when they should be paused.
Make default action as WLAN_NETIF_ACTION_TYPE_NONE. If this is the
action to be taken, donot call the pause_cb from dp_tx_desc_alloc.

Rate limit log levels in case dp_tx_desc_alloc fails.

Change-Id: I1ef3018e90576d2c3aaa0d10d56e9b155681271b
CRs-Fixed: 2421813
2019-04-08 22:01:47 -07:00
Varsha Mishra
a331e6e55f qcacmn: Implement delay VOW stats for hawkeye
Delay counters per TID have been implemented for following types:
1. Linux stack to hw enqueue delay
2. HW enqueue delay to tx completion delay
3. TX interframe delay
4. RX interframe delay
5. RX frame delay from ring reap to networking stack

Change-Id: I836596cbd878a43955c18b4981cb5b7b43d4df5e
2019-03-12 06:10:05 -07:00
Sravan Kumar Kairam
b75565e98f qcacmn: Add cdp api for dp tx desc availability
Add cdp api to check if tx desc pool available descriptor
threshold has reached.

Change-Id: Ie542d03dd865d32aa6e01da00328aa51728b4276
CRs-Fixed: 2369218
2019-01-07 00:12:44 -08:00
chenguo
e4faf863c5 qcacmn: Code refine for duplicated spin unlock function
There are several duplicated spin unlock function calling in the
AC based TX flow control path. Remove this redundant codes.

CRs-Fixed: 2329973
Change-Id: I483bf97612b8e56f745360a3e84fbdff8c357ea9
2018-10-23 02:45:57 -07:00
Pamidipati, Vijay
12e8f33fc6 qcacmn: Fix a double free issue for tx descriptor
Tx descriptors that belong to a particular vdev are released in
vdev detach path. Since DP soc is not detached yet, interrupts
are not disabled, so it is possible that host gets completions
for same tx descriptor and it tries to process it again.

Add a check for vdev in tx completion path to avoid duplicate
processing of tx descriptors

Change-Id: I5a62ef4d981dbfd0a5ca7483acf4270145d016be
2018-10-13 22:24:15 -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
Ruchi, Agrawal
2cbca3b050 qcacmn: msdu time lag update for tx completion
msdu time from hwenqueue to tx completion as part of
msdu stats.

Change-Id: I71ba6f1dec0505e4fa09b5fb123f21912b08b9c5
CRs-Fixed: 2286774
2018-08-31 00:51:20 -07:00
Yue Ma
442d36e967 qcacmn: Tie PM usage count to descriptor allocation and free
Tie increment and decrement PM usage count to descriptor allocation
and free instead of HW enqueue and TX completion since allocation
and free will be the most accurate places to track if the packet
has been sent or not.

Change-Id: Ia61c5bb26386d20590e87149d0fe88dba02d0fb7
CRs-fixed: 2302214
2018-08-28 20:10:48 -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
Jinwei Chen
fc76555f2e qcacmn: add the tx_desc id checking
If host receive the tx completion with invalid tx_desc ID,
panic happened. add the tx desc ID check both on dp_tx_hw_enqueue
and dp_tx_comp_handler to know that how this invalid tx_desc ID
is generated by which reason of below two:
1. host tx desc is corrupted and fill in invalid id to TCL_DATA_CMD.
2. FW or HW generate invalid TX compl to host.

Change-Id: Id2b070697199b19f83e5d9fd89eadcfe0423d617
CRs-Fixed: 2243455
2018-06-14 11:47:07 -07:00
Jinwei Chen
15da8a56d7 qcacmn: fix tx desc allocate from freed pool issue
The avail_desc is not set to 0 when the tx desc pool is
freed, later if still try to allocate tx desc by judgement
of avail_desc, panic happens.

Change-Id: Ia4565da1caa6898c6d4293e2658cf4ccf89563fa
CRs-Fixed: 2246328
2018-06-04 00:55:39 -07:00
Soumya Bhat
dbb8530245 qcacmn: Tx desc counter changes
Add following Tx desc counter changes:
1. Initialize tx_desc allocated counter
2. Initialize tx desc free counter
3. Use per pool tx desc counter num_allocated to populate desc_in_use
   counter

Change-Id: I4d80d0acfbbdd32a9f7d66e938e0a0f4e2cd7048
CRs-Fixed: 2239623
2018-05-21 06:06:17 -07:00
Prathyusha Guduri
02ed94801a qcacmn: Add support in DP for enabling multiqueue support
Enable multiqueue on VAP with 4 Tx and Rx queues in lithium.

In Rx path set the rx queue of skb based on the reo ring id on which it
is received.

In Tx path use the queue_mapping of skb to map to the hardware Tx ring
on which it has to be transmitted.

Change-Id: I103a21e91d1ed5c0e1d8441863d4fcd273b7bed9
2018-05-14 03:00:07 -07:00
Manjunathappa Prakash
38ff9e3bb1 qcacmn: clear the tx_desc flags in V2 flow_ctrl dp_tx_desc_free
Make sure to clear the tx_desc->flags field before putting the tx_desc to
free pool. This was not takencare in V2 flow_control implementation.

Change-Id: I666b9b09de62d52cffc45e2b6db3a6be06d688e8
CRs-Fixed: 2186884
2018-05-02 19:48:03 -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
Manjunathappa Prakash
ddf07405c5 qcacmn: Fix ext Tx descriptor pool lock issue
Replace internal spin_lock macros with qdf_spin_lock APIs for lock
operating on TSO/EXT descriptor pools.
TX_DESC_LOCK_* APIs are used only by the flow_control V2 support
to by pass them.

Change-Id: I926c279de3878b6f48efd798194fa896072c1f6d
CRs-Fixed: 2142815
2017-12-08 06:22:32 -08:00
Manjunathappa Prakash
98b30de852 qcacmn: Track available ext descriptors in the pool
Check for available ext descriptors before accessing freelist.

Change-Id: Iaeea9c7b3b69d14d53bcc23054ebd309b8be2ea9
CRs-Fixed: 2148174
2017-11-27 15:20:47 -08:00
Pamidipati, Vijay
625276bc31 qcacmn: Increase number of Tx descriptors for 1024 clients
Increase the Tx descriptor pool size to 32K to take care of
1024 client requirement

Change-Id: If6e0711204479e602d7cb468270ee2279a5c4dfe
2017-09-25 09:21:51 -07:00
Pamidipati, Vijay
776310a80e qcacmn: Fix the page mask used for Tx Descriptor
Increase the number of bits allocated for page mask to
accomodate upto 16K descriptors needed in Tx path

Change-Id: I9a1a2757be353c3bd9f78773b87cca7c86041b9c
CRs-Fixed: 2004658
2017-07-27 20:17:18 -07:00
Manjunathappa Prakash
133af812fb qcacmn: Do not include cds_api.h in dp_tx_desc.h
WIN compilation fix, cannot include cds_api.h in dp_tx_desc.h

Change-Id: Ia3a83a07f3353e72267daaf14a908c9144bb3e46
CRs-Fixed: 2078435
2017-07-18 23:35:17 -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
Pamidipati, Vijay
f82fb2b8f7 qcacmn: Add support to process v2 fw2wbm completion structure
FW has moved to using v2 HTT_FW2WBM message format for Tx completions
Add corresponding change on Host.
Add missing code to free Tx descriptors for few HTT completion types
Also change the descriptor pool lock to spinlock_bh since transmit path
and completions typically run in tasklet/softirq context

Change-Id: I024d44243f95907f19086225f0f02a5cd64f4508
CRs-Fixed: 2068155
2017-07-11 23:48:00 -07:00
Venkata Sharath Chandra Manchala
35503cce26 qcacmn: TSO fixes
1. Unmap tso common segment only after receiving
   completions for all the tso segments for a given
   skb.
2. Keep a track of num of free tso descriptors available
   in the pool of tso descriptors.

Change-Id: I01bdbb9e40b7259f77dbcfeec22c6d8cd0c0a6dd
CRs-Fixed: 2042950
2017-05-22 17:05:21 -07:00
Ishank Jain
c838b133c1 qcacmn: Add Mcast enhancement feature support
Feature to convert Multicast packet and send them as unicast.

Change-Id: I64d44ac337bd366c6799226fd69f89cd3e46e65d
CRs-Fixed: 1116432
2017-04-14 10:17:19 -07:00
Ishank Jain
5122f8fc48 qcacmn: Enable TSO support for QCA8074/6290 DP
Add TSO support for transmit datapath of QCA8074/6290

Change-Id: Id7254859372aa43e3ed16f80c0240d1b78ae63cc
CRs-Fixed: 2004658
2017-03-17 00:36:45 -07:00
Ishank Jain
bc2d91f8f3 qcacmn: Add TxRx Statistics for Lithium datapath
Statistics can be displayed by issuing following commands

iwpriv ath0 txrx_fw_stats 3 /*Rx Rate Info*/
iwpriv ath0 txrx_fw_stats 6 /*Tx Rate Info*/
iwpriv ath0 txrx_fw_stats 8 /* print Tx stats */
iwpriv ath0 txrx_fw_stats 27 /*print Rx stats */

To reset the stats:
iwpriv ath0 txrx_fw_stats 9 /* clear all stats */

Change-Id: If4be2549f43403e71ef092c23b1cf14b35a2e5d4
CRs-Fixed: 1114641
2017-03-09 17:37:42 +05:30
Vijay Pamidipati
4d5d436e8a qcacmn: Add missing lock protection between DP Tx and Tx completions
Change-Id: I68dd5371688235c173a5bc6576601389146e0ecb
CRs-Fixed: 2004658
2017-02-17 10:35:25 -08:00
Leo Chang
c2a7b763d1 qcacmn: add tx descriptor handle
Add memory optimized tx descriptor alloc, free and handle code

Change-Id: Iabd499b7690bbf8bc09223ea7e72e8f81818482a
CRs-fixed: 1076601
2016-10-31 09:54:11 -07:00