Commit Graph

20 Commits

Author SHA1 Message Date
Jinwei Chen
18989f8ede qcacmn: support multiple pages prealloc for descriptor
Support multiple pages prealloc for DP descriptor

Change-Id: I66d4cef3acf69acf4b6fc8e5a6d01c3d67921dca
CRs-Fixed: 2751338
2020-09-21 01:33:16 -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
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
Varun Reddy Yeturu
a7c21dc7f3 qcacmn: Allocate multi page memory for dp_rx_desc_pool_alloc
Allocate memory in multiple smaller chunks for dp_rx_desc_pool_alloc,
and link the pages instead of allocating one big contiguous memory to
avoid memory allocation failures.

Change-Id: Id81de10727555c4ca78963a6f01ed3b992ce9924
CRs-Fixed: 2443999
2019-05-23 20:35:07 -07:00
phadiman
a1f798250d qcacmn: Provide API for dp soc reinit
dp_soc_reinit is a flag to check if the
Rx descriptor memory can be reused across
WiFi up/down

Provide an API which checks the flag and
returns either true or false based on the
value set

CRs-Fixed: 2354186
Change-Id: I8c1afbfe0f743d7c9ab37a42a9ef0c6ac1fbf39c
2019-02-27 09:56:10 -08:00
Anish Nataraj
e9d4c3bf33 qcacmn: Reorganise DP init-deinit path to reuse memory
Avoid memory fragmentation that happens during
attach-detach flow.
- Reuse transmit allocated static pool memory across soc up/down.
 These memories are allocated during soc attach.
- Reuse DP source ring memory, DP soc context, DP pdev context
  across soc up/down.
- Reorganise structure members of DP soc and DP pdev so that
  we can zero out structure members across soc up/down
- Add cdp soc init/deinit and cdp pdev init/deinit that
  will be active across soc up/down

Change-Id: I5732453f617bdc16995fda916b645c41845c3ecb
2018-11-30 03:40:43 -08:00
Kiran Venkatappa
08bf93bbaf qcacmn: Use multi-page alloc for tso descs
Regular allocs usually result in allocation of size aligned to
slab boundary resulting in more memory than the requested. Use
multi-page allocation to avoid allocation of more memory than
requested.

Change-Id: Id6562f2fe419179e27206ff5b1d543090b931607
CRs-Fixed: 2294213
2018-09-03 05:11:16 -07:00
Balamurugan Mahalingam
f72cb1f1ff qcacmn: include hal_hw_headers.h header file
macros and fw cmn headers included in hal_internal.h is moved
to a new hal_hw_headers.h to avoid these getting included in hif
layer. Include the new hal_hw_headers.h file

Change-Id: I3390ae9e71ca561d94a265e1fdf4d9354e7b2474
2018-07-21 00:03:27 -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
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
Om Prakash Tripathi
fcb34c7f2c qcacmn: Fix different lock being released than taken
1. Fix a case in dp where lock is taken on tso segment but
   released on tso desc.
2. Increment dma alloc size if allocation is successful

Change-Id: I73d54026a1c268597105096925d138008c2d8c1e
CRs-Fixed: 2131278
2017-11-23 01:34:40 -08:00
Jeff Johnson
3f217e2a81 qcacmn: dp: Replace instances of unadorned %p
Replace instances of unadorned %p in dp.

Change-Id: I8d9c0f6efe5f03a582a36d7ff39a905a5de576a7
CRs-Fixed: 2111274
2017-09-28 04:48:10 -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
Venkata Sharath Chandra Manchala
99868ac3ca qcacmn: Unlock the tso segment descriptor pool
Unlock the tso segment and tso common segment descriptor
pool if there are no descriptors available in the freelist.

Change-Id: I5c09e381769cdaa914e03ced24dccae8aea90897
CRs-Fixed: 2042950
2017-06-08 15:23:19 -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
Pamidipati, Vijay
1b63ac6bf5 qcacmn: Fix a compilation issue in TSO DP code
THis issue is seen only when FEATURE_TSO is enabled

Change-Id: Ife12f6c3c7ed2310ce7cc1b566c1ff70aa360072
CRs-Fixed: 2004658
2017-03-31 04:25:59 -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
2f81e9605e qcacmn: Increase size of MSDU EXT DESC
Size of MSDU Extension descriptor increased to accomodate HTT Meta data.

Change-Id: Iaaf87f2f184ec9f144501b9a508bf91d08cad791
CRs-Fixed: 1114769
2017-03-07 21:48:46 -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