Commit Graph

19 Commits

Author SHA1 Message Date
Rakesh Pillai
246f1dfdd2 qcacld-3.0: Add support to flush rx packets for a vdev
When a particular vdev is deleted, the corresponding rx
packets which have been queued to the rx thread are not
flushed. Hence when such packets are submitted to the
network stack, the dev for this skb will be invalid,
since we have already freed the adapter.

Flush out the packets in the rx thread queues, before
deleting the vdev.

CRs-Fixed: 2552140
Change-Id: Ia49af2c203c64077f7fd87524bb4caa4060e0044
2019-11-01 00:17:18 -07:00
Rakesh Pillai
6c5af2fc0a qcacld-3.0: Use pdev_id instead of global dp handle
As a part of cdp convergence the pdev_id
is used to obtain the pdev handle on need
basis.

Instead of the pdev handle, use the pdev_id to
retrieve datapath pdev handle.

CRs-Fixed: 2539733
Change-Id: I887ea2f1a312207cbb642b33435f4e7111068c62
2019-10-24 21:41:42 -07:00
Mohit Khanna
7a2116a8a7 qcacld-3.0: Resume DP threads during SSR
During SSR, DP RX threads need to be resumed so that they can be later
shutdown by posting RX_SHUTDOWN_EVENT to the threads. DP Threads
shutdown procedure waits on a completion event, which is completed by
the threads. In case the threads are not up, the caller may
be stuck waiting for DP threads to shutdown.

Check state before DP RX thread suspend/resume to avoid repetitive
suspend/resume requests.

Change-Id: Idb689e0dae7cf487e0bea45ef2dade369ae2f9f6
CRs-Fixed: 2529673
2019-09-30 14:40:47 -07:00
Rakshith Suresh Patkar
1a2bfd5e28 qcacld-3.0: Remove peer_local_id usage in dp_rx_thread_process_nbufq
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.

This change invloves removal of local_peer_id usage from
DP API dp_rx_thread_process_nbufq.

Change-Id: Ibfed421df3ace139808d16365ec5d54e9b013dfe
CRs-Fixed: 2512693
2019-09-06 22:24:47 -07:00
Mohit Khanna
ba8b3fe3a8 qcacld-3.0: Use different wait queues for threads
Currently DP RX threads are using the same wait_q for all operations.
The problem with this is that when there is traffic for only one
threads, we end up waking up other threads as well moementarily.
This wastes power and is in-efficient.

Use different wait queues for different threads.

CRs-Fixed: 2495719
Change-Id: I689659b7aa0ab93b7e2f009d2dc7fe741b66ee78
2019-08-13 20:25:57 -07:00
Mohit Khanna
f0620ce6ca qcacld-3.0: Add support for GRO flush indications
Add support for sending GRO flush indication to DP Rx Thread.

CRs-Fixed: 2495719
Change-Id: I8723dc696d8af705067a50dcf5f161ef4f28d485
2019-08-13 16:23:28 -07:00
Mohit Khanna
c77d69d19b qcacld-3.0: Affine threads to perf core in high tput
Affine DP RX Threads to perf cluster in high throughput scenarios.
High throughput is detected using existing logic from the bandwidth
timer.

Change-Id: Ieb98c6930807ba42be7f5b4d0b8a78dfb197ba27
CRs-Fixed: 2474322
2019-06-28 18:07:50 -07:00
Mohit Khanna
b7194395ee qcacld-3.0: Handle unregistered OS RX handles in DP RX Thread
On association completion, RX handles are registered with the DP layer
as a part of cdp_vdev_register. It is possible that immediately after
association, host receives RX packets, but RX handles have not been
registered for the vdev with DP layer.

Drop packets in DP RX Thread if OS RX handles are not found for the
vdev.

Change-Id: I3bbd489ec9c5e6f6267521818663b123a85bb3f9
CRs-Fixed: 2419376
2019-03-28 16:50:07 -07:00
Dustin Brown
207286b118 qcacld-3.0: Provide reason to QDF_DEBUG_PANIC()
A common pattern in WLAN to panic the driver is to log the reason and
then unconditionally panic. QDF_DEBUG_PANIC() takes a reason string to
help make the reason for the panic more obvious, but it is not always
used. Ensure all callers of QDF_DEBUG_PANIC() provide a reason string.

Change-Id: I3d23a8980adaeaa1a9798a4a6b0fba1f36eb52ad
CRs-Fixed: 2403829
2019-02-23 14:06:21 -08:00
hangtian
127c953c7f qcacld-3.0: Use qdf_mem_zero for zero initialization
Use qdf_mem_zero for zero initialization.

Change-Id: Ic2b8d907623cf67a4569aaf01398c1b3a2bff707
CRs-Fixed: 2376644
2019-01-14 08:38:03 -08:00
Mohit Khanna
c9649650d2 qcacld-3.0: Support to dump DP RX Thread stats
Add DP RX Thread Stats support. Stats can be retrieved using iwpriv
dumpStats command.
Remove print from hdd_gro_rx_dp_thread function. This condition is
expected when gro is disabled on low throughput. Print is not needed.

CRs-Fixed: 2346997
Change-Id: I3619844b66e845184a4b8c77763bf9f2d2ea0a38
2019-01-13 18:45:47 -08:00
Mohit Khanna
8141877926 qcacld-3.0: changes for GRO for TCP packets
Add support for GRO functionality for TCP packets.

CRs-Fixed: 2346997
Change-Id: I9d38c926af4114e90427f5b5c632cd02b9eb3160
2018-12-18 00:07:46 -08:00
Mohit Khanna
4079b4b464 qcacld-3.0: Remove un-initialized lock from DP thread
DP RX thread is using an un-initialized lock during suspend/resume
routine. This lock is not needed as the code is executed only by a
single execution context.

Remove usage of un-initialized lock.

CRs-Fixed: 2351010
Change-Id: I656562fe3ca73a5044163008a44ffae416a6a7fa
2018-11-29 18:11:58 -08:00
Nirav Shah
7c8c171e05 qcacld-3.0: Remove unnecessary prints from data path
1. Remove error prints for qdf_mem_malloc APIs.
2. Remove unnecessary __func__ from data path prints.

Change-Id: I6c4b110f626d84da055821c5f210a3d000b6ff15
CRs-Fixed: 2317315
2018-11-16 05:08:30 -08:00
Jianmin Zhu
13921e9f1e qcacld-3.0: Fix compiling issue of __DP_RX_THREAD__H
error: '__DP_RX_THREAD__H' is used as a header guard here,
followed by #define of a different macro [-Werror,
-Wheader-guard]

Change-Id: I21beca14c8ea98a9a6c4a4acd5f3c7428fd56e01
CRs-Fixed: 2315965
2018-09-18 23:39:56 -07:00
Sravan Kumar Kairam
0512a84dba qcacld-3.0: Dequeue nbuf list from rx thread before continue
Currently in function dp_rx_thread_process_nbufq inside while
loop with nbuf list as condition if peer or vdev is not found
nbuf list is freed but not assigned to NULL and continue operation
is done. This leads to invalid freed nbuf list access in successive
loop iteration. In this change after nbuf list is freed assign it
to the next nbuf list which is in the rx thread queue.

Change-Id: I4b595a8708f91677645815105ad736926de91758
CRs-Fixed: 2309908
2018-09-18 01:02:59 -07:00
Pramod Simha
7ee7b53e2c qcacld-3.0: Handle nbufs with ext list in RX thread
Check for nbufs which might already have an existing ext list
before appending to it.

Change-Id: Iac24eaf8430d7f9280386f1449c567fce8aa52fb
CRs-Fixed: 2304742
2018-09-12 15:55:48 -07:00
Mohit Khanna
13ea524aa3 qcacld-3.0: Donot de-init DP RX threads if not inited
In one of the tests, when the driver switches to FTM mode, DP RX threads
are not initialized as the necessary configuration is not passed down
from CDS. However, cds_dp_close tries to de-initialize the threads and a
spinlock un-initialized error is seen.

Donot de-initialize the DP RX thread module if it is not initialized.

Change-Id: I14a1dcb678c9d953abd3262e86408d12f4eb2617
CRs-Fixed: 2301398
2018-09-02 14:33:23 -07:00
Mohit Khanna
7032200a77 qcacld-3.0: Support for DP RX Threads
Add support for DP RX Threads as a part of the FR. Multiple RX threads
can be enabled from the ini. The code is added in a new DP module
outside of the cmn project.

Change-Id: Ief6ee955f13c5e527986307371b8e45677cb9700
CRs-Fixed: 2256446
2018-08-24 18:35:32 -07:00