Commit Graph

30 Commits

Author SHA1 Message Date
Subash Abhinov Kasiviswanathan
1842e30e8a dfc: add stall recovery timer
Add watchdog timer to recover potential data stall when data is
not going to the expected DRB and no DFC indication is received.

Change-Id: Iaa4b4814967cf9400c36115a083922376d23928d
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-07-14 17:01:27 -07:00
Subash Abhinov Kasiviswanathan
aeca58ead5 dfc: fix null pointer access
Fix a null pointer dereference issue when data packets trigger the
queuing of powersave work before the powersave workqueue is initialized.

Change-Id: Ia3515a7aaa47cb41568c39462bca73ceae11ea9c
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-07-07 20:38:20 -07:00
Arnav Sharma
b7cf580e81 Fastforwarding datarmnet code to data-kernel.lnx.1.1
Change-Id: Iaa23d64a4b93e87bcd8c42923ba398471834e0e8
2020-06-11 16:51:59 -07:00
Subash Abhinov Kasiviswanathan
17190b7e11 core: Add trace point for gso verification
This patch adds trace events to help with debug for gso feature
by identifying the packets (and their lengths) that are using
the segmentation offload feature.

Adding source and destination port number info
in the gso trace events to differentiate between
the flows.

CRs-Fixed: 2697145
Change-Id: I4f9786afa799cb1589bd07393c0922913037390d
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-28 22:25:10 -06:00
Subash Abhinov Kasiviswanathan
2a1b9716b1 rmnet_ctl: re-arrange ipa registration
Re-arrange ipa registration sequence to handle cases where rmnet_ctl
is being initialized before ipa is ready.

Change-Id: Ic8416ad8f96f818e32f1320e997287ebfe755d03
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-26 13:49:48 -07:00
Subash Abhinov Kasiviswanathan
9a791f3de4 net: qualcomm: rmnet: Allow UL aggregation time limit of 1ms
Reduce the minimum allowed UL aggregation timeout to 1ms
as a lower limit might be preferable to reduce latency for
sporadic traffic scenarios.

CRs-fixed: 2692360
Change-Id: Iba1c02232fa83d7cac112bd4b3f625128e2da88b
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-21 12:51:13 -06:00
Subash Abhinov Kasiviswanathan
6c318682bc core: cleanup task boost list
Cleanup entries in the task boost list when the pid becomes inactive.

Change-Id: I0b1b2ef81cda470cd08b31ab4e78f81d346b9b70
Acked-by: Ryan Chapman <rchapman@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-20 15:43:25 -06:00
Sean Tranchetti
94d3f634df rmnet: Control DL csum offload with RXCSUM
Similar to the UL direction, allow the hardware checksum offload support
to be toggled off with the NETIF_F_RXCSUM flag though ethtool.

Change-Id: I38e43cf9c13363eee340793878be7639f18254e3
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-05-18 17:35:32 -06:00
Subash Abhinov Kasiviswanathan
0daa9b15d3 core: Check for aggregated skb size before copy
This ensures that the target aggregated skb has sufficient
tailroom to copy the incoming skb content. Checking for
the configured size may not reflect the true value.

Fixes the following-

<2> skbuff: skb_over_panic: text:000000006faa6b25 len:4044
    put:1288 head:000000007024fb17 data:000000007024fb17
	 tail:0xfcc end:0xec0 dev:rmnet_ipa0
<2> ------------[ cut here ]------------
<2> kernel ... at net/core/skbuff.c:108!
<2> Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
<2> pc : skb_panic+0x4c/0x50
<2> lr : skb_panic+0x4c/0x50
<2> Call trace:
<2>  skb_panic+0x4c/0x50
<2>  skb_push+0x0/0x44
<2>  skb_copy_bits+0x0/0x264
<2>  rmnet_map_linearize_copy+0xa8/0x110 [rmnet_core]
<2>  rmnet_map_tx_aggregate+0x358/0x45c [rmnet_core]
<2>  rmnet_egress_handler+0x2cc/0x2f4 [rmnet_core]
<2>  rmnet_vnd_start_xmit+0x1a0/0x1f8 [rmnet_core]
<2>  dev_hard_start_xmit+0x1e0/0x394
<2>  sch_direct_xmit+0xe4/0x32c
<2>  __qdisc_run+0x4ec/0xb48
<2>  __dev_queue_xmit.llvm.8867084656021901384+0x3ec/0x9c8
<2>  neigh_direct_output+0x18/0x24
<2>  ip_finish_output2+0x3f4/0x5b0
<2>  __ip_finish_output+0x1d4/0x248
<2>  ip_finish_output+0x50/0xe0
<2>  ip_output+0x148/0x194
<2>  __ip_queue_xmit+0x378/0x3d4
<2>  ip_queue_xmit+0x14/0x20
<2>  __tcp_transmit_skb+0x7b4/0xc4c
<2>  tcp_write_xmit+0x868/0x1194
<2>  __tcp_push_pending_frames+0x38/0xd0
<2>  tcp_push+0x124/0x154
<2>  tcp_sendmsg_locked+0xae4/0xcd0
<2>  tcp_sendmsg+0x38/0x5c
<2>  inet6_sendmsg+0x5c/0xa4
<2>  sock_write_iter+0xf8/0x17c
<2>  __vfs_write+0x1a0/0x220
<2>  vfs_write+0xe4/0x1a8
<2>  ksys_write+0x7c/0xe8
<2>  __arm64_sys_write+0x1c/0x28
<2>  el0_svc_common+0xb8/0x1c4
<2>  el0_svc_handler+0x6c/0x88
<2>  el0_svc+0x8/0xc

CRs-Fixed: 2687877
Change-Id: If8cf289c2629be28b890927c54cb4d4209b24bc5
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-15 18:04:56 -06:00
Subash Abhinov Kasiviswanathan
c4bd722431 core: Hold on to module reference
Do not remove module if the dependent modules are removed.

CRs-Fixed: 2683697
Change-Id: I35539aff061fe57a85f0bb8eb3dcf40499eca760
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-11 19:43:16 -06:00
Subash Abhinov Kasiviswanathan
fa1352fa7a dfc: remove unsupported modes
Removes DFC modes that no longer supported.

Change-Id: I86c5d549ca02b0313dc89ed9e12d770323e55a9e
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-29 11:33:47 -07:00
qctecmdr
f45bf5cef2 Merge "rmnet_ctl: enable IPC logging" 2020-04-21 09:07:40 -07:00
Subash Abhinov Kasiviswanathan
e87877cb0c rmnet_ctl: remove dependencies
Removes hard dependendencies between rmnet_core and rmnet_ctl.

Change-Id: I9931380fc6406eec5842a824181a0bacbb6ce73a
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-17 20:06:40 -07:00
Subash Abhinov Kasiviswanathan
05ac1acb02 rmnet_ctl: enable IPC logging
Enable rmnet_ctl debugfs parameters and IPC logging.

Change-Id: I2228e5d4ae86ad5ef2fb17205f14e837255d706c
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-13 17:50:17 -07:00
Subash Abhinov Kasiviswanathan
2724751ae6 dfc: port the latest fixes
Port the latest fixes from msm-4.19. This includes:
- Clear status flags when entering powersave (Ifc6457f1696ef)
- Adjust QMAP query grants (I9da42a9d2425)
- fix use-after-free (I76ab4a99b3f4)

Change-Id: I1beb93d1f6fdf214c8756bd0e488914bf876aa5e
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-10 15:27:23 -07:00
Subash Abhinov Kasiviswanathan
5a88e58652 rmnet_ctl: Support IPA EP
Support QMAP commands from dedicated IPA EP.

Change-Id: Ic5e489d2b33223b2af2fb471d20611bc5a0d7d58
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-03 13:47:42 -07:00
Sean Tranchetti
5fd6051c6c core: Update timespec API usage
Kernel code should now use the timespec64 struct instead of the older
struct timespec and its APIs.

Change-Id: I2792b637bf1054521e3f1ff7c82d1cdbf4f3adea
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-04-02 15:20:45 -06:00
Sean Tranchetti
d6d43874af net: qualcomm: rmnet: flush uplink aggregation on priority tx
If the RmNet driver needs to transmit a packet marked as needing
prioritization, it should skip uplink aggregation of the packet to avoid
adding additional delay. Additionally, any aggregated packets should be
flushed prior to sending the prioritized packet to avoid any ordering
issues.

Change-Id: Ia3063ec3f0553693a0f66c8eb5bbb88d250f7523
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-03-30 11:40:17 -06:00
Subash Abhinov Kasiviswanathan
2204dee91b core: Remove dl marker v1 usage
This removes the unused dl marker v1 definitions, handlers and users
since these are no longer used.

This also fixes the following CFI warning-
CFI failure (target: rmnet_perf_core_handle_map_control_end.cfi_jt+0x0/0x4 [rmnet_perf]):
WARNING: CPU: 1 PID: 0 at kernel/cfi.c:29 __ubsan_handle_cfi_check_fail+0x4c/0x54
pstate: 60400005 (nZCv daif +PAN -UAO)
pc: __ubsan_handle_cfi_check_fail+0x4c/0x54
lr: __ubsan_handle_cfi_check_fail+0x4c/0x54
Call trace:
__ubsan_handle_cfi_check_fail+0x4c/0x54
__cfi_check+0x204/0x220 [rmnet_perf]
rmnet_map_dl_trl_notify_v2+0x58/0x88 [rmnet_core]
rmnet_frag_flow_command+0x110/0x120 [rmnet_core]
rmnet_frag_ingress_handler+0xe0/0x3bc [rmnet_core]
rmnet_rx_handler+0x1cc/0x2a4 [rmnet_core]
__netif_receive_skb_core+0x554/0xdc4
process_backlog$4cc8cf18b485f47de9fc54109f04daea+0x1a4/0x314
net_rx_action$4cc8cf18b485f47de9fc54109f04daea+0x144/0x578
__do_softirq+0x250/0x580
irq_exit+0xcc/0xd0
handle_IPI+0x228/0x3b0
efi_header_end+0x148/0x17c
el1_irq+0x108/0x200
lpm_cpuidle_enter$a9941074ca35bb1f25355cf2ff310eae+0x57c/0x5c8
cpuidle_enter_state+0x130/0x334
cpuidle_enter+0x38/0x50
do_idle.llvm.4847091502713502628+0x1e4/0x2ec
cpu_startup_entry+0x24/0x28
__cpu_disable+0x0/0xbc

CRs-Fixed: 2647192
Change-Id: I5dc625f0791aff9738b2128f99c79d7e0dadf26d
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-03-22 21:21:49 -06:00
Subash Abhinov Kasiviswanathan
0dfa55e06d core: rmnet: Remove unnecessary warning
Remove warning from module load. Fixes the following-

WARNING: CPU: 2 PID: 735 at core/rmnet_config.c:753
 init_module+0x18/0x64 [rmnet_core]
pstate: 60400005 (nZCv daif +PAN -UAO)
pc : init_module+0x18/0x64 [rmnet_core]
lr : do_one_initcall+0x190/0x380
Call trace:
 init_module+0x18/0x64 [rmnet_core]
 do_one_initcall+0x190/0x380
 do_init_module+0x5c/0x210
 load_module+0x45d8/0x480c
 __arm64_sys_finit_module+0xec/0x120
 el0_svc_common+0xbc/0x1c0
 el0_svc_handler+0x6c/0x88
 el0_svc+0x8/0xc

CRs-Fixed: 2644088
Change-Id: Icab7f3b3021a94e4376374b9cb3b905178f9894a
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-03-17 21:22:05 -06:00
Conner Huff
609413920b core: Update netlink policy structure
Newer versions of kernel require attribute structs
to define lengths exactly.

Change-Id: I7195b4974cf18ff3b3cbeb4d2ed863ff97ab7b92
Acked-by: Ryan Chapman <rchapman@qti.qualcomm.com>
Signed-off-by: Conner Huff <chuff@codeaurora.org>
2020-03-11 16:57:08 -07:00
Sean Tranchetti
1ea6d3f011 net: ethernet: qualcomm: rmnet: Track RSB/RSC byte counts
Allows calculation of the average buffer utilization for RSB/RSC packets.

Change-Id: Id719b97ceffc62b1b9ce28bfab8ec32c6604529c
Acked-by: Conner Huff <chuff@codeaurora.org>
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-02-26 18:22:34 -08:00
qctecmdr
15a708a475 Merge "core: Split product packages" 2020-02-25 13:29:32 -08:00
Subash Abhinov Kasiviswanathan
1d2f235dc4 dfc: Not flow control NDP packets
Allow all NDP packets to be sent regardless of flow control state.
These packets are needed for address configuration even if the default
flow is disabled from the beginning of the call such as in 5G SA.

Change-Id: Ia10e41c5ec8e163b9682c6b4f553f9b102020042
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-02-21 16:12:11 -07:00
Subash Abhinov Kasiviswanathan
c9eea21709 core: Do not zero out transport checksum
Hardware does not use the value populated in the transport checksum
field for checksum computation in MAPv5 format if checksum required
bit is set. The partial checksum can be left as is in these cases.

Explicitly marking the field as 0 could potentially cause incorrect
verdicts in hardware in translation scenarios for UDPv4.

CRs-Fixed: 2626450
Change-Id: I8d9e38e6af0df344ceebd630a895b1d7f467b1db
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-02-20 17:00:03 -07:00
Subash Abhinov Kasiviswanathan
19bd91be77 core: Split product packages
Add logical separation between board and product makefiles.

CRs-Fixed: 2620634
Change-Id: I84a43e7a4e13367918efcdb760f6991fc5cced9d
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-02-12 10:17:06 -07:00
Subash Abhinov Kasiviswanathan
9caf059028 core: Add to product packages
This is needed to install the module at the preferred location.

CRs-Fixed: 2616023
Change-Id: I480ece2dac0a2169c7f8c7187a5a51e1d637e6c2
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-02-05 14:24:02 -07:00
Sean Tranchetti
eeb4944964 core: rmnet: Fastforward to 4.19 tip
This brings the RmNet and DFC modules up to date with the 4.19 tip as of
commit 9b38611ea527 ("rmnet: Reduce synchronize_rcu calls").

As part of this, the rmnet_ctl driver was also incorporated, using commit
4ceee3aafb7d ("rmnet_ctl: Add IPC logging and optimizations")

Change-Id: Ic45d46074c7401dfed408c769cfb6462dac0d4ee
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-01-23 13:31:14 -07:00
Subash Abhinov Kasiviswanathan
08d4972b2a core: Rmnet initial commit
Inital commit of rmnet_core net device driver in dlkm form
in datarmnet. This requires rmnet to be disabled in the
kernel and for it to be loaded before dependent modules.

CRs-Fixed: 2558810
Change-Id: I742e85033fa0999bf9069d43ce73ab9a622a8388
Acked-by: Raul Martinez <mraul@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2019-12-10 15:22:43 -07:00
Git User
f226883d3b Initial empty repository 2019-11-28 01:39:39 -08:00