summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-29Merge b74079bcf465e1c0789c337f90d9e24c13aeb6de on remote branchLinux Build Service Account
Change-Id: I7fee54d46b8684a9d863bf7a9bf81390e07afa71
2020-04-17Merge 901b28da5ea27d7abc9c462ba370fa4ae2db0795 on remote branchLinux Build Service Account
Change-Id: I0676bb33de92d5d5d5b8ad22cee9ca7e835a1a8a
2020-04-10Merge "drivers: rmnet: shs: Check backlog on all flushes"qctecmdr
2020-04-08drivers: rmnet: shs: Check backlog on all flushesSubash Abhinov Kasiviswanathan
Checking for backlog will no longer occur for only cpus with segmented flows. Backlog NET_RX switching will now be checked for on every silver CPU regardless if segmented flows are available. Change-Id: Ic6912e9c3ddd719cb9b0f5b13609ba7161d31b1f Acked-by: Raul Martinez <mraul@qti.qualcomm.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-08drivers: rmnet: shs: Reduce Max Backlog limitSubash Abhinov Kasiviswanathan
Some small OOO packets were still seen in extreme cases. Reducing the backlog limit threshold slightly. Change-Id: I9ccd09445d521e94879bef5cba2041702086e83d Acked-by: Raul Martinez <mraul@qti.qualcomm.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-06Merge "drivers: rmnet_perf: Avoid recursive spinlock in legacy mode"qctecmdr
2020-04-06Merge "drivers: rmnet_perf: Increase number of flow nodes"qctecmdr
2020-04-01drivers: rmnet_perf: Increase number of flow nodesSean Tranchetti
Allow up to 50 flows to be coalesced by software; Change-Id: I0c578f3c5b65b2826767c4bd7421b585f2125936 Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-04-01drivers: rmnet_perf: Avoid recursive spinlock in legacy modeSean Tranchetti
Commit 56901a4a6639 ("drivers: rmnet_perf: Take lock during DL marker handling") locks the DL marker handling to ensure synchronization. When rmnet_perf handles deaggregation of QMAP frames, this will result in attempting to take the lock recursively, as the lock will already be held by the deaggregation logic. Change-Id: I731574ed56e770193c9b094758d7f4119ef91781 Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-04-01drivers: rmnet_perf: Take lock during DL marker handlingSean Tranchetti
Since handling DL markers can result in flushing the various flow nodes, the rmnet_perf lock must be taken to ensure synchronization with the rest of the driver. During hotplug scenarios, a regular flush could be going on while a DL marker handling callback is invoked. In certain cases, the callback can proceed farther than it should, and send a second pointer to a previously flushed descriptor down the call chain. This phantom descriptor can cause various problems, but the most "common" case seen is a NULL dereference such as the following: rmnet_frag_deliver+0x110/0x730 rmnet_perf_core_send_desc+0x44/0x50 [rmnet_perf] rmnet_perf_opt_flush_single_flow_node+0x220/0x430 [rmnet_perf] rmnet_perf_opt_flush_all_flow_nodes+0x40/0x70 [rmnet_perf] rmnet_perf_core_handle_map_control_start+0x38/0x130 [rmnet_perf] rmnet_map_dl_hdr_notify_v2+0x3c/0x58 rmnet_frag_flow_command+0x104/0x120 rmnet_frag_ingress_handler+0x2c8/0x3c8 rmnet_rx_handler+0x188/0x238 Change-Id: I79cb626732358c827d6c9df4239c0c55821bd3a5 Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-03-29Merge c390153e4f08c5b5fe985a0afc9f73c559ab0441 on remote branchLinux Build Service Account
Change-Id: I73033efb6a6ec59825cc40967cc348e8c05e6df1
2020-03-23data-kerenl: Remove GSB code from LAAman Gupta
GSB is needed only for MDM PLs
2020-03-19Merge af399a1677059208970e9f71ffa6bccb1f3db770 on remote branchLinux Build Service Account
Change-Id: Iacc25275348ec8ab156b20243c6b15fdac4fcf28
2020-03-18drivers: rmnet: shs: Snapshot of data.lnx.5.1Subash Abhinov Kasiviswanathan
Snapshot of shs driver on data.lnx.5.1 up to the following change id. drivers: rmnet: shs: Unrevert Deadlock fix I1307d82ffa12d0cc1115baa25a19df8ada924e89 Change-Id: I868f2fff8a90d1e99860803c994cee0f69af60b2 Acked-by: Raul Martinez <mraul@qti.qualcomm.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-03-11drivers: rmnet_shs: Add Max Backlog switch for TCPSubash Abhinov Kasiviswanathan
Change instant rate timer to rely more on byte limit counts. Add backlog limit to loaded core metric that will only be active when a slow start flow is on the cpu. This type of NET_RX switch will also have a longer core switch timer. Change-Id: I414db0d10c1b72d54df25138bd8adf0902357847 Acked-by: Raul Martinez <mraul@qti.qualcomm.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-03-11Merge 762f7ff9d5f6c3973d3eae970927f43825925aaf on remote branchLinux Build Service Account
Change-Id: Icb6c973a2d6c4282156c1836605aabb0d10bf785
2020-02-20Merge "data-kernel: emac: Emac probe end marker"qctecmdr
2020-02-20Merge "drivers: shs: Add filter flow module param"qctecmdr
2020-02-20Merge "drivers: rmnet_shs: Fix invalid mask on vnd creation"qctecmdr
2020-02-18drivers: rmnet_shs: Fix invalid mask on vnd creationSubash Abhinov Kasiviswanathan
For a time after a vnd is created, the shs internal map_mask is updated to an invalid state. If this happens during data transfer it could cause invalid cpu states. This fix will cause the map_mask to only take into acount already initialized vnd rps values. Fixes the following- Unable to handle kernel write to read-only memory at virtual address ffffff99a0b5484c pc : rmnet_shs_flush_lock_table+0x264/0x688 [rmnet_shs] lr : rmnet_shs_flush_lock_table+0x238/0x688 [rmnet_shs] Call trace: rmnet_shs_flush_lock_table+0x264/0x688 [rmnet_shs] rmnet_shs_chain_to_skb_list+0x320/0x340 [rmnet_shs] rmnet_shs_assign+0x980/0x1290 [rmnet_shs] rmnet_deliver_skb+0x240/0x410 rmnet_frag_deliver+0x618/0x778 rmnet_perf_core_flush_curr_pkt+0x12c/0x148 [rmnet_perf] rmnet_perf_tcp_opt_ingress+0x88/0x268 [rmnet_perf] rmnet_perf_opt_ingress+0x348/0x398 [rmnet_perf] rmnet_perf_core_desc_entry+0x128/0x180 [rmnet_perf] rmnet_frag_ingress_handler+0x3a8/0x578 rmnet_rx_handler+0x230/0x400 __netif_receive_skb_core+0x518/0xd60 process_backlog+0x1d4/0x438 net_rx_action+0x124/0x5b8 __do_softirq+0x2f8/0x5d8 irq_exit+0xec/0x110 handle_IPI+0x1b8/0x2f8 gic_handle_irq+0x10c/0x1d0 el0_irq_naked+0x50/0x5c Change-Id: I4c10ebb83140eb14ee3b643d057e3de29dfa851b Acked-by: Raul Martinez <mraul@qti.qualcomm.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-02-13Merge c93506932fc4870b824f8412a34775d37900b04c on remote branchLinux Build Service Account
Change-Id: I17a95af88c915280d5342e5a99a392498fda534f
2020-02-12data-kernel: EMAC: phy attach optimization.Sunil Paidimarri
Skip phy chip sw reset as we already doing hw reset to improve emac probe time. Change-Id: I2a8696855e97c0b60dfebbe83b9e2bdd6349d24b Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2020-02-11data-kernel: emac: Emac probe end markerLakshit Tyagi
- Add place marker for emac probe end Change-Id: Ia7ba12397dabaa6cfc81c82839458bdea5b08ffd Signed-off-by: Lakshit Tyagi <ltyagi@codeaurora.org>
2020-02-10drivers: shs: Add filter flow module paramSubash Abhinov Kasiviswanathan
Add a module param of currently running consistent flows. This module param will allow a filtered viewed in cases when shs goes into idle mode and when multiple idle flows have been created. Change-Id: I6b9c9b18c30575d2b59dd76814f4b7b2a2953bc0 Acked-by: Raul Martinez <mraul@qti.qualcomm.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-01-29Merge "data-kernel: emac: reduce the rw operation to 200ms"qctecmdr
2020-01-29Merge "data-kernel: EMAC: mdio bus register optimization."qctecmdr
2020-01-29data-kernel: emac: Add delay after phy resetSuraj Jaiswal
This add delay of 50ms after phy reset so that phy get sufficient time. Change-Id: Ia75ca969b46c891f6b47bd237cf845d2101ff4d9
2020-01-28Merge "data-kernel: EMAC: Etherent wol optimization."qctecmdr
2020-01-28data-kernel: EMAC: Etherent wol optimization.Suraj Jaiswal
Enable wake on lan on interface open not during ethernet driver probe to reduce driver initialization time. Change-Id: Icee83f29e1276df2ce5287ed790f30368d4d09bc Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2020-01-27data-kernel: EMAC: Etherent phy detection optimization.Suraj Jaiswal
Read phy address from dtis to avoid dynamic phy detection which will reduce ethernet initialization time. Change-Id: I95e4386e98bebf9a71aa186b3ebd20cea758c7db Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2020-01-27data-kernel: EMAC: mdio bus register optimization.Sunil Paidimarri
Populate the phy mask correctly to avoid scanning of all pins for phy detection. Change-Id: Ia730518ffb1dce0d1b4f47c3d9c7f42a7ce7de20 Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2020-01-27data-kernel: emac: reduce the rw operation to 200msSunil Paidimarri
fix to reduce MDIO delay in read and write operation in phy regs of the emac driver. Change-Id: I559c4ee00da57547113b83fd980803a4b19b5c03 Acked-by: Abhishek Chauhan <abchauha@qti.qualcomm.com> Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2020-01-26Merge bdc07671ca3f0f6e5d37f667ce028fe128636679 on remote branchLinux Build Service Account
Change-Id: I4963fd1150ba6ba5f2c21a2a28f35413c3c6fa6f
2020-01-16Merge c7a5aef3cb6d95bd0b307dce66df341be8a91a3d on remote branchLinux Build Service Account
Change-Id: I5fedc1f2bd670421ae29ca49b554005ce8efb05e
2020-01-10drivers: shs: Clear out pending core switch timers on cleanupSubash Abhinov Kasiviswanathan
In case there is a burst of data beyond a threshold, the core switch timer will try to schedule a worker once the timer expires. While the pending work is cleaned up on timer expiry, the pending timers itself are not cleared up. As part of this change, the core switch module parameter is reset on start of cleanup to ensure no more timers are configured during the cleanup. Fixes the following- 399.705316: <6> Modules linked in: rmnet_perf(O) [last unloaded: rmnet_shs] 399.734305: <2> pstate: 20400085 (nzCv daIf +PAN -UAO) 399.739251: <2> pc : rb_insert_color+0x10/0x168 399.743555: <2> lr : timerqueue_add+0x88/0xc0 400.413555: <2> Call trace: 400.416084: <2> rb_insert_color+0x10/0x168 400.420042: <2> enqueue_hrtimer+0x198/0x1c0 400.424081: <2> __hrtimer_run_queues+0x4e8/0x5b0 400.428568: <2> hrtimer_interrupt+0x108/0x350 400.432793: <2> arch_timer_handler_virt+0x40/0x50 400.437373: <2> handle_percpu_devid_irq+0x1dc/0x428 400.442122: <2> __handle_domain_irq+0xa0/0xf8 400.446345: <2> gic_handle_irq+0x154/0x1d4 400.450298: <2> el1_irq+0xb4/0x130 CRs-fixed: 2594249 Change-Id: I6e4a1982ce4665340cb1a75d0ec17d1db3f286fc Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2019-12-18Merge 4eeda91ff12a1b561a65fa7d0d1a28d0b92d624b on remote branchLinux Build Service Account
Change-Id: I6feb6a89d841735476ea9e7cac86874bc0b55978
2019-12-10data-kernel: EMAC: Check NAPI before calling netif_rx_skbSunil Paidimarri
Changes to check if NAPI is enabled and then call netif_rx_skb, else follow the legacy way of calling netif_rx_ni. Acked-by: Abhishek Chauhan <abchauha@qti.qualcomm.com> Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2019-12-05Fastforwarding data-kernel CRT:data.lnx.5.1-191205 to data.lnx.6.0Arnav Sharma
2019-12-04Merge "data-kernel: EMAC: emac cleanp"qctecmdr
2019-12-04data-kernel: EMAC: emac cleanpSuraj Jaiswal
THis change add support for proper cleanup for Ethernet on shutdown/reboot. Change-Id: I3545905ad8ad0e139cf49f489868c738fd699445
2019-11-29drivers: shs: Fix potential null dereference on page alloc failureSubash Abhinov Kasiviswanathan
Check before using page allocated for capabilities, gold flows and slow start flows. CRs-fixed: 2576578 Change-Id: I8f062004466447703c84912506af5963035c163c Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2019-11-29drivers: shs: Protect all file system operations using shs ep lockSubash Abhinov Kasiviswanathan
This add synchronization between the file system operations and the updates which occur within the shs workqueue. Fixes the following when there are two instances of userspace handlers running and are killed together- <6> Unable to handle kernel paging request at virtual address ffffffbfadadadb4 <2> pc : __free_pages+0x24/0xc0 <2> lr : free_pages+0x38/0x48 <2> Call trace: <2> __free_pages+0x24/0xc0 <2> free_pages+0x38/0x48 <2> rmnet_shs_release_caps+0x9c/0xb0 [rmnet_shs] <2> close_pdeo+0x94/0x120 <2> proc_reg_release+0x64/0x88 <2> __fput+0xdc/0x1d8 <2> ____fput+0x1c/0x28 <2> task_work_run+0x48/0xd0 <2> do_notify_resume+0x950/0x1160 <2> work_pending+0x8/0x14 CRs-fixed: 2576578 Change-Id: I67d1fc4d1f3c93d4497e988c2118c410091f0dd2 Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2019-11-28Merge "drivers: perf: Register/unregister on perf"qctecmdr
2019-11-27drivers: perf: Register/unregister on perfConner Huff
Before registering perf structures make sure it has not yet been registered before. Conversely, if deregistering perf, make sure that it was registered in the first place. Signed-off-by: Conner Huff <chuff@codeaurora.org> Change-Id: I00b89f45780161615b25faebfa70e79dde530c2f
2019-11-27data-kernel: rmnet: shs: Fix Errors Reported during Static Analysis.Chinmay Agarwal
Set the weights to be used in calculating "avg_pps", when the flow is executing on the Perf CPU's in function "rmnet_shs_wq_get_flow_avg_pps". Change-Id: Ia50db34a348c068a9b1bf3171fced858ce0a62de Signed-off-by: Chinmay Agarwal <chinagar@codeaurora.org>
2019-11-26data-kernel: Add io macro settings for emac core version 2.1.1Sunil Paidimarri
Change-Id: I7d661f7bb23e812783d61c63061e19f8e743efff Acked-by: Nisha Menon <nmenon@qti.qualcomm.com> Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2019-11-25Merge "emac: Perf setting"qctecmdr
2019-11-22drivers: shs: limit size copied to cached flows array to avoid globar var ↵Subash Abhinov Kasiviswanathan
corruption Add limit to the number of flows copied into the gold flow and slow start flow arrays before memcpy to shared memory. Going out of bounds on the array write corrupted the global variables for the shared memory pointers. Fixes the following: [ 846.803490] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000081 [ 846.909206] Process kworker/4:1 (pid: 80, stack limit = 0xffffff800b670000) [ 846.916377] CPU: 4 PID: 80 Comm: kworker/4:1 Tainted: G S O 4.19.81+ #1 [ 846.930899] Workqueue: rmnet_shs_wq rmnet_shs_wq_process_wq [rmnet_shs] [ 846.942612] pc : rmnet_shs_wq_mem_update_cached_sorted_ss_flows+0x9c/0xf0 [rmnet_shs] [ 846.950657] lr : rmnet_shs_wq_eval_cpus_caps_and_flows+0x74/0x218 [rmnet_shs] Change-Id: Ifeee71e48fc61c4dd750eb061573beb88fcd2b7d Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2019-11-22drivers: shs: fix deadlock caused between generic netlink and rtnl locksSubash Abhinov Kasiviswanathan
Fix for a deadlock seen when trying to register the shs generic netlink family inside of the callback context of rtnl_netlink. Instead of running in the notifier's context, the generic netlink registration is moved to initialization of the kernel module. Fixes the following lock contention scenario: [ 3302.102281] Call trace: [ 3302.102332] __switch_to+0x108/0x118 [ 3302.102357] __schedule+0x8fc/0xcd8 [ 3302.102368] schedule_preempt_disabled+0x7c/0xa8 [ 3302.102384] __mutex_lock+0x444/0x660 [ 3302.102392] __mutex_lock_slowpath+0x10/0x18 [ 3302.102399] mutex_lock+0x30/0x38 mutex_lock(&rtnl_mutex); [ 3302.102422] rtnl_lock+0x14/0x20 rtnl_lock [ 3302.102448] nl80211_pre_doit+0x28/0x1a0 [ 3302.102465] genl_rcv_msg+0x3a4/0x408 [ 3302.102473] netlink_rcv_skb+0xa8/0x120 [ 3302.102481] genl_rcv+0x30/0x48 down_read(&cb_lock); [ 3302.102487] netlink_unicast+0x1ec/0x290 [ 3302.102496] netlink_sendmsg+0x2ec/0x348 [ 3302.102609] Call trace: [ 3302.102615] __switch_to+0x108/0x118 [ 3302.102624] __schedule+0x8fc/0xcd8 [ 3302.102630] schedule+0x70/0x90 [ 3302.102638] rwsem_down_write_failed+0x2bc/0x3c8 [ 3302.102644] down_write+0x4c/0x50 [ 3302.102652] genl_register_family+0xb4/0x650 down_write(&cb_lock); [ 3302.102818] rmnet_shs_wq_genl_init+0x1c/0x38 [rmnet_shs] [ 3302.102847] rmnet_shs_wq_init+0x218/0x328 [rmnet_shs] [ 3302.102873] rmnet_shs_dev_notify_cb+0x378/0x3e0 [rmnet_shs] [ 3302.102892] raw_notifier_call_chain+0x3c/0x68 [ 3302.102909] register_netdevice+0x374/0x560 [ 3302.102934] rmnet_vnd_newlink+0x6c/0xe8 [ 3302.102942] rmnet_newlink+0x9c/0x198 [ 3302.102950] rtnl_newlink+0x648/0x7b0 [ 3302.102960] rtnetlink_rcv_msg+0x270/0x388 mutex_lock(&rtnl_mutex); Change-Id: Ib71de0cb4617477cab40a7f42154584765e30c2b Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2019-11-22drivers: shs: fix null check before freeing slow start listSubash Abhinov Kasiviswanathan
Checks the correct pointer for null before freeing the associated page for slow start shared memory. Fixes the following: [ 2982.239281] Unable to handle kernel paging request at virtual address ffffffbfadadadb4 [ 2982.239512] pc : __free_pages+0x24/0xc0 [ 2982.239515] lr : free_pages+0x38/0x48 [ 2982.240605] Call trace: [ 2982.240609] __free_pages+0x24/0xc0 [ 2982.240613] free_pages+0x38/0x48 [ 2982.240632] rmnet_shs_release_ss_flows+0x38/0x58 [rmnet_shs] Change-Id: I1c61b8c9c89905e94c24f6836eaf1d7f56566162 Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>