Commit Graph

54 Commits

Author SHA1 Message Date
Manjunathappa Prakash
93aff9ee1f qcacmn: Add DP INI to tune netdev features at runtime
Add INI to modify the HW checksum capability advertisement.
Add hook to update enable/disable of HW checksum for vdev.

Change-Id: Idd0bad1d39c8411c7b4ef19483aa2c75a756791b
CRs-Fixed: 2732099
2020-08-20 23:08:11 -07:00
Yu Tian
db5374f08f qcacmn: Allow drop pkts when pkts pending is large
On some cases, dp_rx_thread can not handle nbufs in time,
then a large number of packets are pending in
rx_thread->nbuf_queue, which run out of system memory at
last and failed to malloc new buffers for refill buffer
ring, fw crash is encountered. To avoid this, drop RX
packets when the pending number becomes large.

Change-Id: I370ad983b185b6ecb28fa7c0b4820b8edc00c710
CRs-Fixed: 2737191
2020-08-05 20:59:13 -07:00
Mainak Sen
eeaa5b7471 qcacmn: INI param to configure Rx S/W desc count
Rx s/w descriptor count should be configurable from
dp_rx_sw_desc_num INI

Change-Id: Id4bbe261b985219dad8d129679ab85e2dd1ba084
2020-08-04 14:59:06 -07:00
Manikanta Pubbisetty
d315e2d238 qcacmn: add INI to enable/disable RX buffer pool
Add a new INI parameter to enable/disable RX buffer pool.

Change-Id: I186f2e1c4f4d008371efb6b041dc93e029c2f7c3
CRs-Fixed: 2731517
2020-08-01 13:13:40 -07:00
Rakesh Pillai
7bad5a8ce3 qcacmn: Increase the size of reo reinject ring
Currently when running downlink traffic with
fragmentation enabled, the SW2REO is getting
full. Increase the SW2REO ring size to 128 entries.

Change-Id: If43bc72a8cc173d44953ca367573800243b1cc5d
CRs-Fixed: 2738309
2020-07-31 03:44:51 -07:00
Karthik Kantamneni
5e49c050f4 qcacmn: Update supported MAC per target for QCA6750
Currently WLAN_CFG_MAC_PER_TARGET value is two which may cause
dp stats request sent to firmware with unsupported pdev mask.

Update WLAN_CFG_MAC_PER_TARGET value to one for QCA6750 target.

CRS-Fixed: 2738910
Change-Id: I14fdf483bf7d18bb2f8302251ac096885547b43b
2020-07-27 09:03:52 -07:00
Mohit Khanna
42a8d7ef31 qcacmn: Add P2P UDP/TCP checksum offload INI entry
Add support to enable disable TCP/UDP checksum offload for P2p modes.

CRs-Fixed: 2725395
Change-Id: Id482649e501a8f9a8900a92e3e03a48f0e99603c
2020-07-12 01:49:34 -07:00
Aniruddha Paul
915f53b12f qcacmn: Add INI support for peer ext stats
Add INI support for peer extended stats. The extended
stats as of now include per peer Tx/Rx delay per packet
path.

Change-Id: I20d3c7f81f65f4db5f111eb103945151a8cd83aa
2020-07-09 13:43:41 -07:00
Neha Bisht
e3876720a2 qcacmn: Add ini config to remap reo destination rings used by host
Adding support for enabling ini config to remap reo destination rings
for HK v1, HK v2, maple and pine platforms.

Change-Id: Id9d304521f32497e3acd845ddd2973b96b641516
2020-07-01 05:42:51 -07:00
Mohit Khanna
97200aab9c qcacmn: Add NAN TX checksum offload INI entry
Currently there is a single INI item tcp_udp_checksumoffload to enable
or disable this feature for all the adapters. In some cases, we want to
be able to enable this feature selectively for NAN mode.

Add nan_tcp_udp_checksumoffload ini item to enable or disable checksum
offload feature specifically for NAN mode. If
nan_tcp_udp_checksumoffload is 'true' and tcp_udp_checksumoffload is
false, hardware checksum offload will be enabled only for the NAN
adapter and not for other adapters.

CRs-Fixed: 2693638
Change-Id: I6e255ce68ddc7b01ebdefe4e5e8d2c985388fefe
2020-06-16 12:20:20 -07:00
Yu Tian
76013e1056 qcacmn: Change tx_desc, desc_ext min threshold
For DBS SAP case, need to balance the CPU cost and
TPUT KPI, use tx_descriptor size to control this can
in avoid the influence of IPA part.

CRs-Fixed: 2665268
Change-Id: I702a605b7a3156e429476f6a4d623b69bb19f615
2020-05-28 10:43:09 -07:00
Manjunathappa Prakash
7de632a45c qcacmn: Decouple IPA TCLring and WBM ring size config
Decouple IPA TCLring and IPA WBM completion ring size from regular
Tx TCLring and WBM completion ring size configuration.
This is required as there is limitation on IPA GSI rin size
configuration.

Change-Id: I689d0e8ca72f069c5b68dc1789358e091c554d30
CRs-Fixed: 2665010
2020-04-23 11:32:27 -07:00
Manjunathappa Prakash
28b4573d27 qcacmn: Increase Tx HW and SW to 2K and 4K for qca6490
Increase Tx HW and SW to 2K and 4K for qca6490.
This parameter change is based on the tuning exercise of 1Tx:8Rx device
tests in NaN scenario. This is helping Tx device to burst to multiple
Rx peers, there by improving the TPUT.

Change-Id: I28e1eafb78612c68fe172a640b1386ac88e051a2
CRs-Fixed: 2657056
2020-04-23 11:32:23 -07:00
Rakesh Pillai
018b298dba qcacmn: Increase the wbm release ring size
The WBM release ring size of 64 is a bit too
small for bursty nature of inwards traffic.
In monitor mode, there can be a huge ingress
of packets and returning the link descriptors
back to the WBM can fail due to its small size.

Increase the WBM release ring size to match the
RXDMA buffer ring.

Change-Id: I41c755f29566cd8cb99520736d34304344a82776
CRs-Fixed: 2650480
2020-04-07 20:20:06 -07:00
Manjunathappa Prakash
25390a01c2 qcacmn: flow_ctrl_v2: decouple tx_desc from TCLring descs
Decouple software tx_descs from TCLring descriptors and Increase
TCLring descriptors max INI config limit to 2k to 32k.

Change-Id: I18d014cdb0c1e26b7661ff65aaa8dffe791d7163
CRs-Fixed: 2657056
2020-04-07 03:01:29 -07:00
Amir Patel
925a7d389c qcacmn: Add full monitor mode changes
Add following changes:
	a. Add CDP API to config full monitor mode
	b. HTT configuration changes
	c. Init/Deinit changes for full monitor mode resources

CRs-Fixed: 2632442
Change-Id: I06db5194031b3ea0f0c1e5deda20df4bc0faa0b9
2020-03-20 22:16:00 -07:00
Vivek
d1bd5ce929 qcacmn: Provide valid range for dp_int_timer_threshold_tx INI
The default value provided for the INI item
dp_int_timer_threshold_tx for WIN is 1000 which is
beyond the specified INI range 8 and 100.

Changing the max value to 1000 to accommodate
the default value used by the INI and avoid
warning while parsing INI values.

CRs-Fixed: 2633718
Change-Id: I0aae0338798dab27d4ecb5d67e3b3fcfee983d92
2020-03-19 19:05:14 -07:00
Ankit Kumar
f63aaef3d3 qcacmn: Rename cmd ring to cmd_credit ring
Command ring is now renamed to credit ring on QCN9000
and used for credit based flow.
Renaming the ring to give meaningful name.

Change-Id: I726aed19477fcfb256e4e0cca8ddb9389035b58c
CRs-Fixed: 2562640
2020-02-15 00:32:25 -08:00
Manjunathappa Prakash
d501c32614 qcacmn: Add INI option to enable FISA feature
Add INI dp_rx_fisa_enable to enable/disable FISA feature.
Disable the feature by default.

Change-Id: I0cc524956e32ab9f2b5c556d8ae2e1855e8d3513
CRs-Fixed: 2599917
2020-02-12 11:58:15 -08:00
Vulupala Shashank Reddy
fdb09af186 qcacmn: Componentization packet capture mode INI
As part of componentization of packet capture feature
removed INI of packet capture.

Change-Id: If9f599cbaf5bc3e339dc1f21ee6be36f5eb093f2
CRs-Fixed: 2614621
2020-02-05 22:40:18 -08:00
Alok Kumar
0265d7917a qcacmn: Add INI support for packet log buffer size
Add INI parameter "PacketLogBufSize" to populate
packet log buffer size.

Change-Id: Ic9b963a88a6f6d884d5fa3a63b4fed6768ba2fc4
CRs-Fixed: 2611409
2020-01-30 23:23:53 -08:00
Alok Kumar
74bbfc8aee qcacmn: Add the utils and cfg changes for Moselle
Add the changes in utils and wlan configuration
layer for supporting the newly added IPCI bus type
for Moselle.

CRs-Fixed: 2597342
Change-Id: I4484d6e774e9f94a322b8dee4ae7ff4460ed2634
2020-01-26 00:53:03 -08:00
Alok Kumar
628c21c08e qcacmn: Add INI parameters for packet capture mode support
Add INI parameters for packet capture mode
pktcap_mode_enable - control to enable or disable support for
packet capture mode.
pktcapture_mode - control to set value for packet capture mode

Change-Id: Id0ffe4cf19db6ec5823a37083d9d8ee1cfe53e77
CRs-Fixed: 2528427
2019-12-10 00:51:28 -08:00
Venkata Sharath Chandra Manchala
55299c2b91 qcacmn: Increase reo timer threshold max value
Reo timer threshold is set to 512us as a default so
increase the maximum value of timer threshold to 512us
to avoid out of bound value.

Change-Id: I291e80e5930b2d3537cbbc9716b323aeb6be89c3
CRs-Fixed: 2571639
2019-12-09 15:59:10 -08:00
Venkata Sharath Chandra Manchala
113ba25d75 qcacmn: Add QCA_WIFI_QCA6490 support for pktlog
Enable pktlog processing for QCA6490 based
chipsets.

Change-Id: I23939a284921211fcb869ce8473212014216cf74
CRs-Fixed: 2522133
2019-10-17 15:12:38 -07:00
Ruben Columbus
b7a1c5782d qcacmn: monitor RXDMA drop feature
Adds new INI variable for threshold control.
Host sends message to target with new threshold info.
If buffer reaches threshold then MAC drops incoming monitor frames.

Change-Id: Id659d7df68a5ec0b22fb571dc1ffa4990f8fcc4f
2019-08-29 22:11:08 -07:00
Mohit Khanna
664e64c199 qcacmn: Use 512us REO Interrupt threshold timer
Increase the REO Threshold interrupt timer from 256 to 512us. This
provides additional savings in number of interrupts in low throughput
scnearios.

CRs-Fixed: 2500152
Change-Id: I0b21a0425018d5db068016222378d16f394dc347
2019-08-13 20:26:10 -07:00
Sumeet Rao
76aa8d5194 qcacmn: Add helper functions to fetch ini config for flow tagging
Add helper functions to fetch ini settings for flow tag enable,
flow search table size, global/pdev table selection, monitor mode
enable/disable of protocol & flow tags

CRs-Fixed: 2475913
Change-Id: I66d477d145ea04809bfc17ba3b88a6b8580854a1
2019-08-07 04:58:09 -07:00
Mainak Sen
9550273ede qcacmn: Rx Sw Descriptor allocation should be configurable
To make Rx Software descriptor allocation configurable for each radio,
new ini variable is added.

Change-Id: Ifc5683629747a6fe8238c18448695abe91876ec5
2019-08-05 16:45:59 -07:00
Prathyusha Guduri
abac9eedad qcacmn: Add tx sw internode queue ini config
Add tx sw internode queue ini config that is used by NSS offload mode

Change-Id: I8236a289aa33aaa6bfd1af2ff326438042636139
2019-07-29 04:31:13 -07:00
Prathyusha Guduri
aed67e197c qcacmn: Add tx device limit
Add tx device limit configurable from INI.
This is used to limit the overall tx descriptors used in the device

Change-Id: I51e9611ca14bdc146de914317b38b98329130c9f
2019-07-29 04:31:05 -07:00
Prathyusha Guduri
36ce817b7e qcacmn: Add dp_tx_desc_limits ini config
Add dp_tx_desc_limit for 5G high, 2G and 5G low to limit the
number of software tx_desc to be allocated.

Change-Id: If97e858b73aafaed0e21fc8f6e0337e467ce0ecc
2019-07-29 04:31:01 -07:00
Vivek
7047d0d1a5 qcacmn: Replace WIN/MCL from macro names
There are macro defined differenly for WIN and MCL
to pick up default INI value either for WIN or MCL.

The macro name uses WIN and MCL and also enabling the
right macro is controlled by CONFIG_MCL.

Replace the macro with CONFIG_AP_PLATFORM.

Change-Id: Ib5663532d45534cce1715ef06447116e2654e709
CRs-Fixed: 2484959
2019-07-10 07:24:26 -07:00
Vevek Venkatesan
4a6c3e8568 qcacmn: CONFIG_MCL cleanup in cfg module
Put MCL specific cfg default values under feaature flag
WLAN_MAX_PDEVS.

Change-Id: If34c10ca37e67fbd5fa36d04059be79600c3c328
CRs-Fixed: 2477486
2019-06-27 05:00:19 -07:00
Venkata Sharath Chandra Manchala
cb6d0c0741 qcacmn: Create a wlan configuration table for ring types
1. Add config table to accommodate per ring type
   configuration to have a finer control over the
   ring.
2. Provide struct wlan_srng_cfg interface to add
   more parameters to control the ring.
3. Add interrupt threshold configuration parameters
   to wlan_srng_cfg structure.
4. Add WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING
   and WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING to have
   different timer values for REO and WBM ring.

Change-Id: Ied50e3241ab2cc181ca4ed7f126959cd5d9d2de5
CRs-Fixed: 2455297
2019-06-20 18:36:24 -07:00
hangtian
04f0ad4935 qcacmn: Set stop_th and start_th for QCA_LL_PDEV_TX_FLOW_CONTROL
Use same stop_th and start_th as QCA_LL_TX_FLOW_CONTROL_V2 for
QCA_LL_PDEV_TX_FLOW_CONTROL which allows pausing/unpausing
netif queues to avoid frame drop in driver.

Change-Id: Ifa649e31a41d1bf89eadc8cc7e9520f0e27b9fe4
CRs-Fixed: 2466999
2019-06-18 22:27:45 -07:00
Akshay Kosigi
fb0877f2d6 qcacmn: Use module specific kbuilds for config params
write module specific macros inside module/config and
use these inc files inside the kbuild of the module using those
macros.

Change-Id: Ide18770973f35d0e5c45e2474b24256107f40d8c
2019-06-12 20:04:12 -07:00
sumedh baikady
3c05f9720d qcacmn: Reduce min slab size allocation to <1M
System running out of 2M chunks inspite of large
free memory available. This is WAR till original
issue is root caused.

Change-Id: I379f8a56c31d76b74164a85978659d87ad74f87b
CRs-fixed: 2436495
2019-05-02 21:37:26 -07:00
Venkata Sharath Chandra Manchala
8d583a8695 qcacmn: Validate mac_id for txrx_stats
Add a sanity check to avoid sending a htt
txrx_stats request with an invalid mac_id
parameter to firmware.

Change-Id: Iae980bbffdcf6759b6d467849c5ebc65628f17ba
Crs-Fixed: 2438693
2019-04-28 18:46:38 -07:00
Tallapragada Kalyan
0ef58eec14 qcacmn: Increase the MAX limit of RX Release Ring to 8192
Increase the MAX limit of RX Release ring from 1024 to
8192

Change-Id: I45a4bac2b91b0400fc4acc7cb236f38276a4e0b2
2019-04-12 05:20:28 -07:00
Aniruddha Paul
1b2672426c qcacmn: Increase the NSS Tx comp ring size to 48k from 8k
The max limit of Tx comp ring is changed to 48K from
8k such that it can be dynamically changed based on
the INI.

Change-Id: I69ca62c33d538a669a3417dba749a818ca0bce07
2019-03-22 08:47:26 -07:00
Shashikala Prabhu
550e69c726 qcacmn: Restrict the tx descriptors for low mem config
For low mem config, use user configured max tx descriptors to limit the
allocation of software tx descriptors.

Use dp_txrx_pflow_update_pdev_params function to print stats and to update
pdev param.

Change-Id: I8fa6f0bb8841de68e8dc205ffcb0fde264f1b0e0
CRs-Fixed: 2414452
2019-03-15 23:15:06 -07:00
Krunal Soni
03ba0f55cf qcacmn: Implement new INI to switch-on/off excessive logging in DP
In datapath, some of the messages get printed everytime when packet
is received or sent. This situation ends up in excessive logging which
leads to stability issue.

In order to fix the situation, provide knob through INI to control
excessive logging and create new macro for logging the message which
comes under per packet path.

Change-Id: I2af5f9bf39540f952138aa8308401a387fe62bf1
CRs-Fixed: 2376998
2019-03-06 12:52:00 -08:00
Karunakar Dasineni
1f1acf59c9 qcacmn: Increase max size of REO status ring
Increase maximum allowed size of REO status ring to 2048.

Change-Id: I1b85d7f2154a50a5b69eccec3fb5139a9e2d686b
2019-01-14 17:32:49 -08:00
Kai Chen
692850bdb9 qcacmn: change monitor mode rings size min and max value
change monitor mode buffer, destination, status and
descriptor ring size min and max value

Change-Id: If78f5a745682ae1d4aa4b074b293e1e0a200f661
2018-12-07 15:30:18 -08:00
Karunakar Dasineni
2b7628c863 qcacmn: Fix interrupt batch count initialization
Interrupt batch count configuration "dp_int_batch_threshold_other"
was initialized to wrong values, which was causing missed interrupts
from REO status ring.
Also remove the extra RXDMA2SW ring handling, which is currently
done in both UMAC and LMAC interrupt processing loops.

Change-Id: I9a9e951780356db6b491d1301d2c08ef1ac585d5
2018-11-02 15:26:19 -07:00
Karunakar Dasineni
26ebbe4492 qcacmn: Flush REO descriptors entirely
To avoid race conditions where BA window size can change, always
flush entire REO descriptor from HW cache irrespective of current
BA window size.

Change-Id: I608996722e7dc2dc6acfd145b8c190b58ce09822
CRs-Fixed: 2251811
2018-10-18 02:17:04 -07:00
Mohit Khanna
81179cb75e qcacmn: Fixes for IPA enablement for lithium/Hastings
- Support to pass IPA enabled(disabled) flag from ini to DP layer
- Use ioremap call to translate tx_comp_doorbell_paddr obtained from
  calling ipa_setup api to tx_comp_doorbell_vaddr. This is needed to
  write the initial value of HP at the doorbell address.
- Change REO_DST_RING_SIZE and WLAN_CFG_TX_RING_SIZE to 1023
  for napier/hastings if IPA is enabled. This is needed because,
  ipa_setup API can handle only 16-bit values for the size param(bytes)
  of the ring.
- Disable hash based flow steering for SAP peers in case IPA is enabled
  and set default reo_dest_ring_4 as default RX ring. Since IPA will be
  reaping RX packets from reo_dest_ring_4 only, flow steering is not
  needed for SAP peers.
- Unmap pre-allocated TX buffers for IPA in the TX completion ring.
- Donot execute IPA functionality if IPA is disabled from ini.

Change-Id: I6855bfe293a457ccc0abd1ad5567f5c95232a9d2
CRs-Fixed: 2183519
2018-10-17 17:42:35 -07:00
Karunakar Dasineni
79768452a4 qcacmn: Increase RXDMA2SW ring size limit to 8192
In noisy environments with monitor mode enabled, RXDMA2SW
ring is getting filled with bursts of dummy indications,
which were added as part of a WAR to handle RXDMA issue
with error indications received in monitor path. These
indications won't consume any real buffers, but are causing
ring full assertion failure due to smaller ring size.

This change increases max ring size, and the actual ring
size comes from ini file.

Change-Id: Icb7f08ab0757cb5b6ac7c1aee8e04f200ed4a1bd
2018-10-12 19:17:05 -07:00
jitiphil
60ac9aa036 qcacmn: Add legacy DP CFG items and APIs
Add the basic infra for legacy DP CFG items and the APIs to be used from
other components.

Change-Id: Iec1718f0a93fcb91061892b96ae6ae88174df9ee
CRs-Fixed: 2328481
2018-10-11 08:56:51 -07:00