Some events may send to change the behavior of DP rx thread.
When there are lots of packets pending in rx queue, thread loop
will not get a chance to check and process these events. Change
is aimed to give a yeild to allow checking of thread events.
Change-Id: Ibe64a1ee27086ba8e1ee8c8e9dd316c5fb4a8a42
CRs-Fixed: 3024332
Network package timestamping is optional for TSF feature,
to make it configurable, add a new build flag
WLAN_FEATURE_TSF_PLUS_SOCK_TS.
This flag will be set only when CONFIG_WLAN_SYNC_TSF_PLUS
is enabled and CONFIG_WLAN_SYNC_TSF_PLUS_DISABLE_SOCK_TS
is not.
Change-Id: I413e85fadf93264cd41c2739b6d870aa08d60efb
CRs-Fixed: 3027378
While Rx buffers are getting umapped from net rx context and
if IPA pipes are enabled at same time from MC thread context,
this is leading to race condition and IPA SMMU map/unmap is
going out of sync, in adrestea targets.
To fix this introducing IPA SMMU map lock and sync map/unmap.
Change-Id: Ida4c321d94f9640135c67210c69edb355d827c86
CRs-Fixed: 3021027
For platforms that don't have IPA module, 4 RX rings can be
enabled to map to 4 RX threads. This Change is to implement a
feature flag to separate the number of threads used for
different platforms.
Change-Id: I23744ca6333f29667b0860f386dc9fc45f29abe4
CRs-Fixed: 3018613
Currently CMEM FISA FSE flush work timer can be triggered
in suspend sequence, this may lead to starting timer even
it is pending to executed.
To avoid this check if flush is allowed before starting the timer.
Change-Id: Ie4a8386a7a7c7ae8c2fba97cae65578ae56b0b4b
CRs-Fixed: 3015719
The memory allocation for srngs and tx/rx descriptors
are done during prealloc using macros. This could
potentially result in OOB access if the srngs sizes
and tx/rx descriptor num of elements are increased
via ini config.
Fix is to use ini values to update the srng sizes or
num of tx/rx descriptors for appropriate memory alloc
during dp prealloc.
Change-Id: Iaeac3833fd8e13df6baa9452a7d7f194b86a8bd3
CRs-Fixed: 3012648
Once pkt_log_con_service success in cds_pre_enable,
in case of any further failure, pkt_log_exit cleanup is
not done, so calling CDP interface API for pkt_log_exit.
Change-Id: Ibddc99fb47109a73de095f068694b2548849f14d
CRs-Fixed: 2978390
When vdev down flag is set, rx thread needs to flush the
pending frames in a fixed timeout value. Overall scheduler
timeout value is 10s, fixed timeout for each thread is 4s,
so if more than two threads timeout happens, scheduler timeout
may happen and lead to crash. Change to use adaptive timeout
for each thread to make overall threads wait time less than 10s.
Change-Id: If8acdaf1cac9d776e15d3020c8152101eae74a0c
CRs-Fixed: 2973947
In WEP connection, IV values used for consecutive packets
could be random and need not be monotonically increasing
or consecutive in case of fragments. This could result in
incorrect drop of fragments.
Fix is to not do PN check in case of WEP security.
Change-Id: I8bfe16f3bf68752f4279b3fae1cf485a3abc1af7
CRs-Fixed: 2977416
GCMP header and MIC are not removed for received
fragments which will result in incorrect ethertype
and presence of LLC hdr in the data when the frames
are sent to network stack.
Fix is to add support for GCMP in rx de-fragmentation
path.
Change-Id: I83ed29a766e40e32f4b712342ebd40d08a2c65e0
CRs-Fixed: 2942099
When an existing flow is evicted, there is chance that the
REO ID of the newly added flow and the inflight packets of the
evicted flow mismatch. In such cases, check the FSE metadata of
the flow with that of the packet instead of triggering a BUG().
Change-Id: I7412055101fb72f7b28db615672e88837d79e8d3
CRs-Fixed: 2968500
Refactor fisa history to not directly access "struct rx_pkt_tlvs". This
is needed since rx_pkt_tlv size may be different for Li and Be
architectures.
CRs-Fixed: 2891099
Change-Id: If7359680538128c7b093aef9f2991756a2f753f7
Add the changes in FISA/pkt-capture APIs due to the
modifications in the hal APIs to get rx tlv params.
Change-Id: I5b1827079ca2e056da0db5e396ca90aec57f559b
CRs-Fixed: 2888534
It's also needed to notify supplicant when TKIP michael mic failure was
detected under fragement case, so supplicat can start 60s protect policy
for association.
Change-Id: I9383d653ac957425e09a60a2f495e575741d073a
CRs-Fixed: 2942680
Race condition occurred as rx_thread did not get scheduled
before timeout and gro flush happened in vdev context. At
the same time, rx thread got scheduled and add skb to the
napi queue resulting in crash.
To fix this, Increase the timeout value so rx_thread gets
time to wake up, do gro flush and reset the vdev_del_event.
Change-Id: I2075eda91b1568cce3083869f510fc212dd721f8
CRs-Fixed: 2949803
Currently nbuf is being used to get gso segments after enqueue
to DP RX thread, this will lead to use after free issue because
RX thread may process and even free the buffer by the time nbuf
is accessed for getting gso segments in enqueue/softirq context.
Fix this by updating gso segments before nbuf enqueue to DP RX thread.
Change-Id: I2cc93bf9a44e2d487c1a6d474349cf5c0c5db76a
CRs-Fixed: 2958132
When flow is added in CMEM path init time stamp is not
handled, so initialize flow init time stamp in CMEM path.
Add Fisa error print during reo id mismatch, print flow
and nbuf details which helps to debug the issue even if
local stack variables are not available in dump.
Change-Id: Ibcc44bd8558cc687279bb34267d60b9882d33a24
CRs-Fixed: 2946825
Currently, in the DP RX thread packet drop logic, the aggregated
packet as a whole is considered as one single packet. An aggregated
packet can hold anywhere between 2-16 packets, considering it as
a single packet will make the entire drop logic incorrect.
Consider all packets in the aggregate while computing the number of
enqueues & dequeues to fix the problem.
Change-Id: I70e65bcdfdbaf7821b36606ac6eeae61eaca7406
CRs-Fixed: 2948104
Do not intrabss forward fragmented EAPOL frames that have
DA different from the SAP vdev mac addr when high latency
is enabled.
Change-Id: Idb6e6c001f4dae51c2181e70ab9adbbb964f0ee3
CRs-Fixed: 2942096
Do not intrabss forward fragmented EAPOL frames that have
DA different from the SAP vdev mac addr.
Change-Id: I4145227c9b02fe8cec86ef4ffc3bc2025f906923
CRs-Fixed: 2888467
Modify check to ensure packet number is consecutive for
fragments and drop the fragments if the check fails.
Change-Id: Ica24f65aff65ca58bb010c876f27964b5b2bae6a
CRs-Fixed: 2860242
Multicast frames should not be fragmented and plaintext
frags should not be reassembeld in protected network.
Fix is to drop mcast frags and plaintext frags received
in protected network.
Change-Id: I98cf0715f5832f2f86f86b79dbdbc3a7c86dbfd0
CRs-Fixed: 2860245
Fisa packet history is around 6KB for each sw fisa
flow entry and this is part of the dp_fisa_rx_sw_ft
structure. The total size of the SW FT as a result is
around 830KB and the higher order memory allocation via
kzalloc for this could fail in low/fragmented memory
scenarios.
Fix is to allocate memory for FISA pkt history separately
and attach it to the SW FT entry.
Change-Id: I7296d7269c1b86ec38ea1668e8a0893335bbdb6f
CRs-Fixed: 2934487
Mark rx and fisa history related allocations as non
critical for prealloc. This will ensure that prealloc
init can continue when memory alloc fails for the above
as these are only for debug purposes.
Change-Id: I94fc5c35a3a7a5dae3a4c97cf4ceca4eee7372ca
CRs-Fixed: 2936359
Add entries to pre-allocate memory region for
recording datapath rx refill ring history.
Change-Id: Icbb6d59b834ea7b8957406e68be72bf3072389bf
CRs-Fixed: 2930011
Since it has memory limitation on sdx platform,
also it need different TX buffer configuration for
different case, which require the IPA tx buffer
numbers to be configurable but not only be power
of 2. So did such change for Genoa to meet different
IPA TX buffer config.
Change-Id: I4482e8f37957d3bfcd82645cf0dec0257ad80e80
CRs-Fixed: 2865851
Allocation failed as flow table size is huge.
To Fix this, moved the ft table to prealloc memory.
Change-Id: I27ee62b1bcfced563f45cb80e11978cb3dd46183
CRs-Fixed: 2926899
Modify few ring and descriptor sizes for prealloc
to support the maximum values configured via ini.
Change-Id: Ifc2976c3f9ab271c7740d4a97470d455a8ee1ba7
CRs-Fixed: 2929143
Reduce the log level alloc failure since it is not fatal. Log the
requested size of memory instead of last ring size found in the
case of alloc failure.
CRs-Fixed: 2894342
Change-Id: Idfb0eec7421e4568008517e35b2fb928f09b6818
Remove all of the conditional compilation for pmf since this
feature is mandatory for future scope from protocol point
of view.
Change-Id: Id3a2127e9ecb343ad2a0354dcbc331c22167d7fb
CRs-Fixed: 2852630
scenario:
(1) KASAN is enabled and DP thread is slow to process and deliver
Rx packets to stack.
(2) vdev-2 do disconnection and flush Rx packets that belong to
vdev-2, but DP thread is busy with processing vdev-0 Rx pakcets
then no chance to do GRO flush for vdev-2, Rx flush timeout and
vdev-2 net_dev get freed, later when DP thread do GRO flush for
vdev-2 pakcets, invalid accessing to vdev-2 net_dev happened.
solution:
(1) increase Rx packets flush timeout from 1000 ms to 2000 ms.
(2) do extra GRO flush if timeout happened.
Change-Id: Iddc445d950eeb6cd2bd0b125bf87051e850abeb2
CRs-Fixed: 2894978
Update default values of INI items to most commonly used values
in WCNSS_qcom_cfg.ini file on commercial devices.
Change-Id: Ibf1e22406951855a4e726fb8105913a53d3c33ee
CRs-Fixed: 2874758
The number of fragments in TSO packet are assembled incorrectly
due to wrong loop condition in packet capture mode.
Fix the condition to assemble all segments of TSO packet
correctly in packet capture mode.
Change-Id: Ifd7be13e56c12b2cb4e6a5000b355c9fa972962d
CRs-Fixed: 2877021
There is possiblity of peer being accesed in rx napi context,
when peer is getting freed up at same time from scheduler
thread context in roaming scenario.
To avoid this race free up the peer when unmap handlers received
from F.W for all the peer ids.
Change-Id: Ia0b1fcc6b56e91efe914ca431aeac6e83b773a81
CRs-Fixed: 2867382
Check for TCP proto in bypass_fisa API and deliver nbuf without fisa.
This will avoid additional processing and helps to deliver nbuf earlier.
Change-Id: I26a78e1204ddebab3a6c6e852ce6d289106dd110
CRs-Fixed: 2884112
Call qdf_check_state_before_panic with caller function name and
line number details.
Change-Id: I9fb4b382576e52bc1ad7e316bd09e3124e8fce98
CRs-Fixed: 2857671
FISA debug macro is leading to unnecessary additional functional calls,
to avoid this cleaning up macro and pointing to nop when disabled.
Change-Id: I21ebd64f61e2c31736d55e2d17f588dbddbc15c7
CRs-Fixed: 2869361
Fisa flow entry napi id is initialized to invalid value,
which will cause out of bound access during fisa flush by vdev id.
Fix this by validating array index before access.
Change-Id: Ic7b1b1448194b75777f9dc392043275235caa7f7
CRs-Fixed: 2873033
Zero initialization of Napi id can cause napi id zero context to flush
flow that are uninitialized. Which may cause a race condition if some
other napi context is using the uninitialized fisa flow entry during the
flow learning phase.
Change-Id: Iedca4ee112efa29c70a632c4a365e95f71e8f506
CRs-Fixed: 2864633
Currently MIC verification is not proper for fragmented packets,
fix MIC verification for helium family.
Change-Id: Iac95c579287bafedf6521b38f2c628fd08cca72d
CRs-Fixed: 2869483