Commit graph

547 commits

Author SHA1 Message Date
Linux Build Service Account
6283378ce9 Merge 4579b40320 on remote branch
Change-Id: Icd836fabce6535be8b0e6e8c3e6a7b2c67ab1fe8
2024-02-13 02:27:19 -08:00
Jagadeesh Ponduru
4579b40320 msm: ipa3: reduce rx-wan pool and cmn page, temp pool sizes
Changes to reduce the rx wan pool, cmn page and temp pool sizes

Change-Id: Ibc86c4f2cd0f440d8eafd247600f944175e08803
2024-01-11 18:48:17 +05:30
Chaitanya Pratapa
a7823d280e msm: ipa: allocate page recycling buffers only once
Order-3 allocations are costly when system is in full use.
Make changes to allocate page recycling buffers only once on boot up.

Change-Id: I445e27ecc03aaa00483e7a46a468ef0a6f4bfcfb
Signed-off-by: Chaitanya Pratapa <quic_cpratapa@quicinc.com>
2024-01-11 18:47:58 +05:30
Chaitanya Pratapa
8a2df63502 msm: ipa: avoid OOM Killer for temp allocations
Make changes to use __GFP_RETRY_MAYFAIL to avoid triggering
OOM Killer when allocating pages for temp allocations.

Change-Id: I2f5843c9a1c0a9f41e215c8241713f4670e4b35c
Signed-off-by: Chaitanya Pratapa <quic_cpratapa@quicinc.com>
2024-01-11 18:47:36 +05:30
Ashok Vuyyuru
28b3e2400a msm: ipa3: Flush free page WQ only for page recyle replenish handler
Free page work init only for page recycle replenish handler.

Change-Id: Ieb5e7b2deb109fa46d3ab38be44eaf34fffd4ad2
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2024-01-11 18:47:21 +05:30
Ashok Vuyyuru
ceaf68b200 msm: ipa3: Fix to flush to workqueue during teardown pipe
Workqueue was getting scheduled after teardwon the pipe.
Adding changes to flush to workqueue during teardown pipe.

Change-Id: I5a6b3464d76a9835bfbf7668e8dbb1cdf00c73fe
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2024-01-11 18:47:06 +05:30
Ashok Vuyyuru
ddeae0e52f msm: ipa3: Fix to destory workqueue only if created
Freepage workqueue created only for few pipes, while handling error
scenarios freeing it for all pipes. So adding check to free work queue
only if created.

Change-Id: I8bf097c02f6acd0a4a22b3d4bc5b66f46884fc1e
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2024-01-11 18:46:53 +05:30
Ashok Vuyyuru
d32afa862e msm: ipa3: Changes to enhance find free pages from list
Adding changes to enhance find free pages from list,
 1. When free page not available instead of keep trying
    using temporary pages.
 2. In tasklet search for free pages adding to head.

Change-Id: I991336167519322081faf8f82feec4e3f0d7b161
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2024-01-11 18:46:30 +05:30
Chaitanya Pratapa
d851d46728 msm: ipa: page pool recycling enhancements
Added the following enhancements to page pool recycling logic.

1) Common page pool for coalescing/default pipe.
2) Common page pool will hold 5 times the rx_pool_sz (224) for page
   recycling pool and 3 times for temp pool. This is done to sustain
   50 stream scenarios.

Change-Id: I55adfffa101df33c46e95b0214fb7338644e8d7c
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2024-01-11 18:46:22 +05:30
Chaitanya Pratapa
f46595d8a5 msm: ipa: page pool recycling enhancements
Added the following enhancements to page pool recycling logic.
1) Updated page pool implementation to use list instead of array.
2) Added provision to check for configurable number of list
elements when checking for free pages.

Change-Id: I01c43be5a169c1438fb29b8179854985e199d055
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2024-01-11 18:45:57 +05:30
Linux Build Service Account
de82408521 Merge 75044ebe4b on remote branch
Change-Id: Id5b93554bcb8b960420e064a381244e684daf312
2024-01-10 04:07:32 -08:00
Avinash Kumar
75044ebe4b msm: ipa: Null terminated interface name string argument
received from ioctl

WAN MTU IOCTL received NULL terminated the interface name
string to prevent out of bound memory access while printing
interface name.

Change-Id: I4ca8021e91689f2b1bf0bef7917a5fc7c2168aef
Signed-off-by: Avinash Kumar <quic_avku@quicinc.com>
(cherry picked from commit b639c459e4f7eedc361cee795489de3d379e7e0c)
2023-11-17 10:46:09 -08:00
Linux Build Service Account
1378a669a8 Merge f51228274d on remote branch
Change-Id: I754d230f6a62f55daffe5a64994265318f72a931
2023-11-14 11:48:53 -08:00
Jagadeesh Ponduru
c099b88b49 msm: ipa3: creating new ipc log file for IPA Clocks
Created new ipc ipa_clk log for adding more debug prints
for IPA Clocks in which provides the explicit time taken
by IPA ICC Voting for BW Paths and IPA Enable/Disable Clocks.

Change-Id: I53b7b5baba0ff72df286c86a4b45b0f860014474
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
(cherry picked from commit 331da84e7fa7b3e3c833a38a7e828d72894ed297)
2023-10-25 04:19:47 -07:00
Linux Build Service Account
279b7958a0 Merge a7610a4a94 on remote branch
Change-Id: I3a34388c74c5c34921186a395f39f96d15f53153
2023-08-28 00:55:45 -07:00
Fakruddin Vohra
f51228274d mdm: dataipa: increase the size of prefetch buffer
prefetch buffer is updated from 128 to 256 byte for route
and filter rule read.

Change-Id: Ibddddfda355e8032d6ec40da73394037534d1d78
Signed-off-by: Fakruddin Vohra <quic_fakruddi@quicinc.com>
2023-08-17 22:37:36 -07:00
Ashok Vuyyuru
a7610a4a94 ipa: Fix ioctl buffer allocation due to increased header size
The max header size changed from 64 to 255, which caused increase
in size of structs containing headers (struct ipa_hdr_add). Fixing the stack buffer
allocation size in the ioctl to avoid buffer overflow.

Note for the future: This function allocates number of buffers
on the stack, but uses only one on each call. It would be better
to refactor it, to use only one buffer, in order to minimize
stack allocations.

Change-Id: Id79efe7901ebf85dab4c0ba09cc7bb852cf22a97
Signed-off-by: Ilia Lin <quic_ilial@quicinc.com>
Signed-off-by: Chaitanya Pratapa <quic_cpratapa@quicinc.com>
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2023-07-22 02:08:23 +05:30
Linux Build Service Account
173b2a6f8a Merge 6d9d19a601 on remote branch
Change-Id: I9205c8f650d637aef6669d33639c01e16191fc28
2023-05-28 12:44:09 -07:00
Linux Build Service Account
4d74d21abe Merge 338eb798c7 on remote branch
Change-Id: Ic70d33ed7a966d69f4c379ba42f169bc7ca9879b
2023-05-01 12:35:32 -07:00
Ashok Vuyyuru
6d9d19a601 msm: ipa3: Adding changes to increase workqueue priority
In some scenarios WQ scheduling was delayed. To avoid these
issues adding changes to increase the WQ priority.

Change-Id: I597e73a354f2d136843b19a84c859fe3eb7b51e0
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2023-04-13 02:49:03 -07:00
Jagadeesh Ponduru
1a170ff917 msm: ipa3: fix pointer arithmetic to avoid out-of-bound
When offset gets added to base of the array, it returns
offset plus the number equal to size of the whole array.
So, correct it by passing the address of offset element
in the array.

Change-Id: I8a087ca277bdc476674c7221b5fc0920e6986570
2023-04-10 22:14:05 -07:00
Prasad Arepalli
4763ef465f msm: ipa3: Removing assert in halt q6 channel failed cases.
Removing assert in halt q6 channel failed cases. Previously added it for debug purpose.

Change-Id: If58da0617d9b313038aa7d347e975ce85cbd8e91
2023-03-28 03:04:41 -07:00
Ashok Vuyyuru
338eb798c7 msm: ipa3: Adding changes to remove dependency ipa3_ctx global variable
ipa3_ctx variable not able to access from the client module and so
adding changes to get qmap id details from ipa core driver.

Change-Id: I215ed0137fdad531e23be35b496d4b8e4a43a554
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2023-03-23 17:51:24 +05:30
Ashok Vuyyuru
18f7fea4d0 msm: ipa3: Changes to fix memory leak issue
During adding/deleting header rule found invalid entry not
freeing the header proc memory allocation due to that IPA
context bank page table was full, later it was failed
to map pages. To avoid this issue adding change to
free the memory in failed scenarios.

Change-Id: I8e5fd68d35579b4638e91590f5df876aa9d256a6
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2023-02-03 02:41:32 +05:30
Jagadeesh Ponduru
d72da15579 msm: ipa3: reset skb header before passing it to NW stack
This ensures the network stack that skb->network_header
sits in the valid range of skb->data to skb->tail.

Change-Id: I6061eddc81cb2e9bd0e4d52ceddab792c332e15c
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
2022-12-20 21:10:30 +05:30
Jagadeesh Ponduru
a4dde7e6f9 msm: ipa3: add debug stats in case of pipe setup fail
Adding changes to have a stats when the apps system
pipes failed to setup.

Change-Id: I5cbe23d77736f447665db5258e21386f220d1096
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
2022-12-16 03:41:52 -08:00
Linux Build Service Account
949b287950 Merge 811b817abf on remote branch
Change-Id: I12e482a4ca9087d58e0b1aaa4655ddd8d8394db1
2022-12-05 22:28:00 -08:00
Ashok Vuyyuru
6bc469fdf0 msm: ipa3: Update QMAP ID field in metadata field for GSB client
In XLAT scenario QMAP ID not updated in TX packets, due to that
it was not hitting not correct filter rules. Adding changes to
update QMAP ID field in metadata field for GSB client.

Change-Id: Ic6bfceb0b8e34316507eaf551fb2b62f085a3519
2022-12-01 23:40:13 -08:00
Jagadeesh Ponduru
47849962bb msm: ipa3: add cleanup_rx if setup pipe failed.
Whenever WAN CONS/WAN_COAL_CONS pipes setup fails,
cleaning up the allocated common buffer and temp pools.

Change-Id: I08c58d7bd36edbe820137d3fd760900598c4c8e6
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
2022-11-27 22:53:17 -08:00
qctecmdr
811b817abf Merge "msm: ipa3: Adding check for odl stats" 2022-11-25 01:00:01 -08:00
Ashok Vuyyuru
96bf8d6ea0 msm: ipa3: Adding changes to retry page allocation in WQ
Currently WQ was exiting when page allocation was failed, due to
that number of WQ schedule will increase. To avoid this retrying the
page allocation in same WQ context.

Change-Id: Iefb85ae1552aa595a0959664c3ba55f6aa742551
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2022-11-21 13:10:45 +05:30
Aparna Annapragada
fdd8f35392 msm: ipa3: Adding check for odl stats
Adding Null check while getting odl stats

change-Id: Ic1692cc4b1a1d3c8b559b20fbb2e1371e0b9f9b2
Signed-off-by: Aparna Annapragada <quic_aannapra@quicinc.com>
2022-11-02 22:39:39 -07:00
Linux Build Service Account
56cfed6eb2 Merge f0f97b4005 on remote branch
Change-Id: Iee72ddbd90fd87b72443c22ff812b6ebcd245ecc
2022-07-15 01:43:13 -07:00
Jagadeesh Ponduru
f0f97b4005 msm: ipa3: add check in odl pipe cleanup
Adding a change to check whether the pipe has been
setup or not before going to teardown the pipe.

Change-Id: Ibb408fdf3509facd6c18e3238bdbfd7da0b4a643
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
2022-07-04 20:20:34 -07:00
qctecmdr
fe3a4ad154 Merge "msm: ipa: fix to NULL terminate the pointer" 2022-06-29 04:10:25 -07:00
qctecmdr
109763e47c Merge "msm: ipahal: modify parameter from eq_bitfield[i] to i" 2022-06-28 21:21:41 -07:00
Ashok Vuyyuru
f9a39ef50f msm: ipa3: Added changes to check QMI pointer valid or not
After passing ipa_q6_clnt pointer to function, if it freed in
different thread it may lead to NULL pointer access. So adding
check to see passed pointer valid or not.

Change-Id: I22e272ebdecc62756ee140081524ab4efdd3d02a
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2022-06-22 03:11:03 -07:00
Prashanth Reddy Baddam
f3f4d78a11 msm: ipa: fix to NULL terminate the pointer
Fix to NULL terminate the peers list ptr
after freeing it, to get rid of use after
free issue.

Change-Id: Ide9fde9e7648a7af561a5b0ae0fa085810e59ea6
Signed-off-by: Prashanth Reddy Baddam <quic_pbaddam@quicinc.com>
2022-06-21 06:20:30 -07:00
Jagadeesh Ponduru
6a73b4eff0 msm: ipahal: modify parameter from eq_bitfield[i] to i
From IPAv4.5 versions IPA_TOS_EQ is considered as not supported
and it made to 0XFF, instead IPA_IS_PURE_ACK is given support.
So, when validating the bitfield equations of them, passing
eq_bitfield[i] will throw shift overflow warning as it takes 0xFF.
So, added change to ensure there are no overflow warnings.

Change-Id: I84384723433706784a4ef21b88f33b036edb0a5d
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
2022-06-11 00:23:46 +05:30
Raghavendar rao l
179ab9d536 msm: ipa3: handling MISRA issue
Added some NULL checks to avoid memcpy with zero size,
Updated checks for unsigned integer variables.

Change-Id: Ia426da6b1af04fb5226ba9bbf22f0fce11e4dff0
Signed-off-by: Raghavendar rao l <quic_rlomte@quicinc.com>
2022-06-01 15:01:15 +05:30
Linux Build Service Account
e11102221c Merge f2729f4a13 on remote branch
Change-Id: If452a9f575bddc5235e8e5b6755da7747b65c21d
2022-05-09 06:52:16 -07:00
qctecmdr
f2729f4a13 Merge "msm: ipa3: Handle race condition to avoid NULL access" 2022-04-26 08:36:34 -07:00
qctecmdr
00b46c6d86 Merge "msm: ipa3: Reduce the QMI timeout value to avoid race condition" 2022-04-26 06:13:57 -07:00
Raghavendar rao l
1a79536d0e msm: ipa3: Handle race condition to avoid NULL access
Updated change to avoid race condition and NULL pointer access,
In case of SSR and ioctl call while performing QMI transaction.

Change-Id: I09dbf33d76a3a0d9e4917e62aaf1257a1abe2db9
Signed-off-by: Raghavendar rao l <quic_rlomte@quicinc.com>
2022-04-25 08:58:25 +05:30
Ashok Vuyyuru
9c3cb3f994 msm: ipa3: Reduce the QMI timeout value to avoid race condition
In SSR scenario if QMI response delayed SSR events getting timeout,
To avoid this issue reduce the QMI timeout value from 60sec to 10sec.

Change-Id: Ib0113a91f9bd60b3ea0e374bf249d4859a22a040
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2022-04-22 03:05:53 -07:00
Vinayaka B M
c36b185506 msm: ipa: Set the logbuf NULL after destroy
Set the ipa3_ctx->logbuf NULL after destroy,or
IPAERR will use the ipa3_ctx->logbuf after free it,
that can make crash

Change-Id: I470c4a043d426d7620c01fadac1f1cd12ad54b08
2022-04-22 09:08:14 +05:30
Linux Build Service Account
55d55ae4cf Merge 8aa0d102d8 on remote branch
Change-Id: I18e5285d03e1a848405c9b2d61f81d1985cf0e3d
2022-04-07 23:10:49 -07:00
Cheng Zeng
8aa0d102d8 msm: gsi: Fix the incorrect evt ring pointer
The pointer should be event ring pointer, not transfer
ring pointer, it has chance to get wrong upper 32 bits
when smmu is disabled.

Signed-off-by: Cheng Zeng <quic_chenzeng@quicinc.com>
2022-03-24 16:09:28 +08:00
Ashok Vuyyuru
1024d06f3f msm: ipa3: In deep sleep scenario destroy/ reinitialize uC interrupts
In deep sleep suspend/resume scenario destroy the uC interrupts
in suspend and reinitialize the interrupts in resume

Change-Id: Ib3631cef8e1e78651b6b79aef7f3d65dae0411c2
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
2022-03-17 19:19:06 +05:30
Linux Build Service Account
d1d5b44aab Merge c94d56d42b on remote branch
Change-Id: Ia9082ec3354cb1fc4e4af562c93b65924719506e
2022-03-11 00:23:46 -08:00