Commit Graph

13 Commits

Author SHA1 Message Date
Yeshwanth Sriram Guntuka
34d893df39 qcacmn: IOMMU map and unmap RX buffers to LPASS SMMU CB
IOMMU map and unmap RX buffers into LPASS SMMU context
bank for LPASS to access RX buffers in direct link
usecases.

Change-Id: Ie72a008309e3abdf3fbc7198bb5d3af5e9497180
CRs-Fixed: 3356568
2022-12-22 00:45:12 -08:00
chunquan
fae0e38eb4 qcacmn: Disable monitor mode on sdxlemur
Disable monitor mode on sdx65,it will save 5MB buf,
and improve iperf performance.

Dp_rx_buffer_pool_refill is used monitor mode in
MCC, and rxdma1_enalbe=0, we don't need this logic.
But in WIN side, only monitor mode need this logic,
and rxdma1_enable will set true.

Add func dp_monitor_pktlog_reap_pending_frames and
dp_monitor_pktlog_start_reap_timer in dp_internal.h
for compile issue.

Change-Id: I43fee6d7a1836063a7539c3bd4745eef15a4e4b2
CRs-Fixed: 3129542
2022-02-22 04:54:49 -08:00
Naga
3289db4279 qcacmn: Monitor code segregation
- Features common to both Li and BE and
  their APIs are retained files at dp/wifi3.0/monitor.
- New monitor ops are introduced if there
  is a requirement for divergence of API.
- Diverged API definitions for 1.0 are captured
  in this change.

All of code in below files are moved to 1.0
- dp_rx_mon_dest.c -> 1.0/dp_rx_mon_dest_1.0.c
- dp_rx_mon_status -> 1.0/dp_rx_mon_status_1.0.c

Only Li and HMT specific are moved for below file
- dp_mon_filter.c -> 1.0/dp_mon_filter_1.0.c
- dp_mon.c -> 1.0/dp_mon_1.0.c

Change-Id: I44d163b27565b86068d80e1d97ec11d0b4a081d4
CRs-Fixed: 2991248
2021-10-12 02:28:25 -07:00
aloksing
c60b9619a3 qcacmn: Conditionally compile monitor related features and issue fixes
PATCH[7/7]:
This patch consists following changes:
 -Conditionally compile all monitor destination ring related code
  Macro used QCA_MONITOR_PKT_SUPPORT
 -Add QCA_ENHANCED_STATS_SUPPORT macro to conditionally compile
  enhanced stats support
 -Use QCA_MCOPY_SUPPORT and QCA_TX_CAPTURE_SUPPORT macros
  to conditionally compile MCOPY and Tx capture features
  respectively
 -Use QCN_IE macro to conditionally compile BPR
  feature
 -Use QCA_ADVANCE_MON_FILTER_SUPPORT macro to conditionally
  compile advance monitor filter feature
 -Fix vdev attach issue for special and smart monitor vap
 -Fix status ring initialization issue.

Change-Id: I0deaa28a9a54bf34b0f41e6dd510fdd8d4992db2
CRs-Fixed: 2983780
2021-07-30 21:51:26 -07:00
Karthik Kantamneni
0a7f7fb6a8 qcacmn: Optimize refill buffer pool feature code
Optimize refill buffer pool feature code to be
light weight on CPU, so that refill thread will
consume less CPU resources and also replenishing
RX buffers will be done faster.

Change-Id: I849ca60558c6197003d95e7d54fdb5f837cdc217
CRs-Fixed: 2950166
2021-06-02 13:48:27 -07:00
Yeshwanth Sriram Guntuka
43e51ba3d8 qcacmn: Do not add nbuf to emerg_nbuf_q on free when not initialized
When nbuf is freed via dp_rx_buffer_pool_nbuf_free, the
nbuf is enqueued to emerg_nbuf_q always even in the case
where the emerg_nbuf_q is not initialized. This will result
in NULL pointer dereference when any nbuf is enqueued to
emerg_nbuf_q.

Fix is to add initialization check before adding the nbuf
to emerg_nbuf_q and free the nbuf if emerg_nbuf_q is not
initialized.

Change-Id: I075b3b93203eec21d44ea3967b5f46d59c291a14
CRs-Fixed: 2934593
2021-04-29 17:40:39 -07:00
Yeshwanth Sriram Guntuka
6512d66c27 qcacmn: Create IPA SMMU maps for host replenished bufs
Buffers replenished post processing entries in the
REO2TCL ring do not have ipa smmu mappings created
when RX_PREALLOC_BUFFER_POOL feature is disabled.
This will result in SMMU fault when IPA HW accesses
such replenished buffers.

Fix is to create IPA SMMU mapping for replenished buffers
when RX_PREALLOC_BUFFER_POOL feature is disabled as well.

Change-Id: I0fe611a1279b91a3e45bc269348e05de9015d596
CRs-Fixed: 2915686
2021-04-07 08:16:35 -07:00
Karthik Kantamneni
09f1f1fe46 qcacmn: Fix IPA SMMU mapping issue for RX buffers from refill pool
Refill pool buffer IPA mapping is done during allocation time,
but in some cases where IPA pipes enable/disable happens in between
previous mapping is not valid which is causing SMMU fault from IPA module.

Fix this by moving IPA mapping before replenishing buffers to RXDMA ring.

Change-Id: Ie6c5eb791b6f832f311a6e89489aebef37094d8f
CRS-Fixed: 2901819
2021-03-23 23:43:33 -07:00
Karthik Kantamneni
ca0a3ae0ac qcacmn: Fix memleaks in Rx refill buffer pool
Rx refill lock is not in sync during deinit path causing
mem leak of refill buffers. Set the Rx refill lock during deinit path.

Change-Id: Ic7d07c0fcaae26f6a269afcba4d593be1d5eacad
CRs-Fixed: 2898006
2021-03-15 02:49:23 -07:00
Karthik Kantamneni
c9cec76270 qcacmn: Avoid per packet Rx refill buffer pool lock
Avoid per packet Rx refill buff pool lock, instead
acquire/release lock for burst of nbuf's replenishment.

Change-Id: I778cb9702d31d4b8911cca4e7f06f12c50ef6df9
CRs-Fixed: 2884208
2021-02-25 23:21:25 -08:00
Karthik Kantamneni
595bc84a39 qcacmn: Add RX prealloc pool for replenishing RX buffers
Add and initialize a preallocated pool of buffers which can
be used to replenish RX buffers. During replenish, the buffers
from the pool are used instead of allocating/mapping a new buffer
in the softirq context. This preallocated pool will be refilled
in thread context.

Change-Id: Idf3bd7d25c5d57ddba105ccd8fab672c26a184f1
CRs-Fixed: 2869345
2021-02-09 17:47:02 -08:00
Manikanta Pubbisetty
174c6614a1 qcacmn: fix potential NULL pointer dereference issue
Fix potential NULL pointer dereference issue in
dp_rx_buffer_pool_refill().

Change-Id: I728077fac9f5062c68d92bb219b305b61fb1e9f0
CRs-Fixed: 2858208
2021-02-07 01:53:33 -08:00
Manikanta Pubbisetty
ea9aadb12d qcacmn: add RX buffer pool support
Add support for RX buffer pool, this is a pre-allocated pool
of buffers which will be utilized during low memory conditions.

RX buffer replenish will fail when the system is low in memory;
this is okay if the condition is momentary, but if the
system persists in such state for longer duration, then HW will
run out of free buffers and this results in a crash.

RX buffer pool will be helpful in such scenarios. Buffers from
the pool will be given to the HW when the system is running low
in memory.

Change-Id: I7ca1159d858227a0a2021235d24d763e56ac0b27
CRs-Fixed: 2731517
2020-08-01 13:13:33 -07:00