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
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
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
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
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
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
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
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
Add cdp api to check if tx desc pool available descriptor
threshold has reached.
Change-Id: Ie542d03dd865d32aa6e01da00328aa51728b4276
CRs-Fixed: 2369218
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
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
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
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
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
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
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
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
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
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
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
Increase the number of bits allocated for page mask to
accomodate upto 16K descriptors needed in Tx path
Change-Id: I9a1a2757be353c3bd9f78773b87cca7c86041b9c
CRs-Fixed: 2004658
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
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
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