نمودار کامیت

107 کامیت‌ها

مولف SHA1 پیام تاریخ
Subash Abhinov Kasiviswanathan
2bf67ee76d datarmnet: Add KERNEL_DLKM check
Compile DLKMs only if the system wide flag is true or if the project
specific flag is enabled.

CRs-Fixed: 3208334
Change-Id: I552d67a1cb42f4c8ce392d76c865f6f70b98bec2
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
2022-05-27 18:01:21 -06:00
Elmer Melendez
8638373d04 rmnet_core: CIWLAN HW Low-Latency Path
* Call hook to determine LL SKB

Change-Id: Id0686774a2faec227cb5fa9ac733023a69cfcdae
Signed-off-by: Elmer Melendez <quic_emelende@quicinc.com>
2022-05-01 21:30:56 -06:00
Weiyi Chen
7e90328aee rmnet_core: APS hooks
Add APS pre-queue and post-queue hooks.

Change-Id: I22be34c2a6bad4119e74ab8146d80eb6439fc585
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2022-04-22 15:51:36 -07:00
Subash Abhinov Kasiviswanathan
ca0f1abee9 core: Update udp trace template
Add ip_id field in UDP traces to assist in debug.

CRs-Fixed: 3179386
Change-Id: Iebc0e796dc79d0faa31ccccfa05869901b13ddba
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
2022-04-20 23:46:42 -06:00
Sean Tranchetti
320db4b3c0 rmnet_core: Avoid altering ep before synchronize_rcu()
rmnet_dellink() will handle freeing the endpoint information, but as this
structure is accessed via RCU on the packet path, care must be taken. It
is dangerous to alter any fields inside of it until it is guaranteed that
no one is currently accessing it.

pc : rmnet_frag_process_next_hdr_packet
lr : rmnet_frag_process_next_hdr_packet
Call trace:
  rmnet_frag_process_next_hdr_packet
  rmnet_frag_ingress_handler
  rmnet_rx_handler

Change-Id: I2410d941e370d1173eefd6e63049121285a1cb26
Signed-off-by: Sean Tranchetti <quic_stranche@quicinc.com>
2022-04-11 10:41:44 -07:00
Weiyi Chen
d26ada23f9 rmnet_core: ethtool QMAP stats
Add QMAP(rmnet_ctl) RX/TX stats to the ethtool.

Change-Id: I730c6e06aaadba20d56485891408abfa1be8c27a
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2022-03-29 22:52:02 -07:00
Subash Abhinov Kasiviswanathan
ecd7f76efc core: Update rmnet stats
Add support for additional VEIDs.

CRs-Fixed: 3160476
Change-Id: I9fbd2fb3a31b34ef393f0f318fabe47d9dda4b51
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
2022-03-28 00:29:47 -06:00
qctecmdr
d14eb4ff8b Merge "core: Add transmit path locking" 2022-03-01 16:02:18 -08:00
Subash Abhinov Kasiviswanathan
d7c67e2ec4 core: Add transmit path locking
This is needed to avoid any out of order transmits between
the UL aggregation workqueue context and the direct transmits from
application context. irq_save / restore variant of the lock cannot
be used as dev_queue_xmit() requires interrupts to be enabled.

CRs-Fixed: 3122333
Change-Id: Ie1020bf17e8c1d0e8fc14e999c21c3e007f4f183
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
2022-02-25 14:50:04 -08:00
Subash Abhinov Kasiviswanathan
d73083ed38 core: Add page frame number tracking trace
This change adds the event rmnet:print_pfn.
Note that this requires the udp / tcp rx trace to be enabled.

CRs-Fixed: 3139334
Change-Id: I3a0a26f517390e9861db37eddb5700cf94d54087
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
2022-02-25 15:48:33 -07:00
Weiyi Chen
a2ea279ba9 rmnet_core: fix race condition in rmnet_get_packets
In rmnet powersave work, rmnet_get_packets() could access NULL dev pointer
if rmnet_dellink() is nullifying the dev pointer at the same time.

18377 [   72.651710][ T1527] Unable to handle kernel NULL pointer dereference
at virtual address 00000000000009d0

18424 [   72.653999][ T1527] Call trace:
18425 [   72.654085][ T1527]  rmnet_get_packets+0xc4/0x11c [rmnet_core]
18426 [   72.654170][ T1527]  qmi_rmnet_check_stats_2+0x80/0x410 [rmnet_core]
18427 [   72.654180][ T1527]  process_one_work+0x260/0x804

This change Uses the rcu variant of the hlist traversal function in
rmnet_get_packet for safe concurrency with the hlist del primitives.
It also checks dev pointer before accessing the dev private structure.
The existing synchronize rcu call in rmnet_dellink ensures that the ep
and dev structure are not freed while being referenced in rcu read
session of rmnet_get_packets.

Change-Id: Ib5f5aff6e76f9fffd9110a2aa924ad6ab090991f
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2022-01-25 13:27:49 -08:00
Sean Tranchetti
48a12a6f04 rmnet_core: pass correct length to ip_fast_csum
ip_fast_csum() takes in the header length in 4-byte words, not the length
in bytes.

Change-Id: Ib3941876e21260aad32ed761427714e133220cfb
Signed-off-by: Sean Tranchetti <quic_stranche@quicinc.com>
2022-01-18 23:17:44 -07:00
Weiyi Chen
7512b30ab0 dfc: fix use-after-free
When IPA failed to send a QMAP packet, the skb is freed in IPA so
accessing the skb after IPA failure will result in use-after-free.

Remove the skb access after IPA send failure.

Change-Id: Id5f876d68e8ecae6c8d7e07c99a9f842fbbf51c1
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2022-01-18 23:17:40 -07:00
Weiyi Chen
d8ed8205d4 rmnet_core: LLC auto switch
Support auto switch of bearers to low latency channel.

Change-Id: I3bc029b9736b1c9f645db9f02a1d09ffe8bf1c2b
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2022-01-18 23:16:14 -07:00
Weiyi Chen
5eb9a7affc rmnet_core: packets prioritization
Low latency treatment of UL packets based on priority.

Change-Id: Id7a7d990f05923aacb50901c0e09194155a3edf2
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2022-01-17 23:31:04 -07:00
Subash Abhinov Kasiviswanathan
63d665bf04 core: Add new hooks
Add new ingress and egress hooks to be used by rmnet modules.

CRs-Fixed: 3012130
Change-Id: I934a3933d4ea89ba1c4f5ef2f2589baf66c2d225
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
2022-01-10 12:15:24 -07:00
Conner Huff
24780f8b89 datarmnet: Changes for kalama
Changes needed to update datarmnet for target kalama

CRs-Fixed: 3085494
Change-Id: Ibfb837aab4f9db21a5708ea3e24e85afca2cd5d9
Signed-off-by: Conner Huff <quic_chuff@quicinc.com>
2021-11-30 22:33:22 -07:00
Arnav Sharma
70615d956b Fastforwarding datarmnet CRT:data-kernel.lnx.1.2-211122 to data-kernel.lnx.2.0 2021-11-23 12:11:57 -08:00
Weiyi Chen
cdbf46091a dfc: not using alarm timer
Not using alarm timer for dfc powersave check and eliminate the need
for a wakelock. This allows AP to go to suspend quicker.

Change-Id: I7153055d0231a65125ad88808db9e1d0032f24d9
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2021-11-16 12:43:42 -08:00
Weiyi Chen
d8c9cb078a dfc: Bearer based QMI powersave
Support bearer based powersave mechanism through QMI WDA.

Change-Id: Ife0685aa56605bb1bb52dacd66a7d235dc3faba8
2021-10-28 12:43:57 -07:00
Weiyi Chen
f5c5b86727 rmnet_core: LLC flow control
Support flow control with IPA on the low latency channel.

Change-Id: I1044abf3b8f59f928f9df3c29c50497b64b934a6
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2021-10-14 12:47:53 -07:00
qctecmdr
16c9dc0982 Merge "dfc: reset tx queue" 2021-10-07 20:18:55 -07:00
Weiyi Chen
7a327bbae7 dfc: not caching grant for removed bearers
If a grant indication for a bearer has "removed" flag set, caching
the bearer could lead to data stall for the next data call because
modem will not send grant for this bearer during powersave.

Do not cache grant for the removed or disabled bearers. Also make sure
a bearer is flow enabled when it is associated with a tx queue.

Change-Id: I7eca597e3cc7d5a0bfe523201c454fb45e66a3a0
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2021-10-04 13:48:42 -07:00
Subash Abhinov Kasiviswanathan
c6de1facb0 dfc: reset tx queue
When a bearer is removed, calling qdisc reset on a tx queue
could have a race condition with qdisc dequeue for lockless
qdisc such as pfifo_fast.

This change uses a different mechanism not relying on qdisc
implementation to achieve packet purge on bearer remove.

Change-Id: I8f9201809853b07293896d6cb8e010e9e0904e46
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-10-03 22:25:40 -07:00
Sean Tranchetti
50a4832e09 rmnet_core: track coalescing usage per descriptor
Descriptors that came from coalesced frames will now carry usage info.
In order to prevent overcoutning, only the first segment from each frame
will report this information; the rest will report 0.

This allows a simple calculation of summing the coal_bytes and coal_bufsize
values reported and dividing to determine the total ratio over a given
period.

These values will be reported in the SKB via a new Control Block struct,
accessable via RMNET_SKB_CB(skb);

Change-Id: I8ea31921afa3afad4d2c570ec5728118bd635b86
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2021-09-28 18:10:10 -06:00
Subash Abhinov Kasiviswanathan
6b2b96a9b3 core: Fix use after free in case of command transmit failure
Fixes the following-

[ 2691.143973]ipa ipa3_rmnet_ctl_xmit:474 rmnet_ctl tx queue full
[ 2691.144001]Failed to send to rmnet ctl
[ 2691.144020]Unable to handle kernel NULL pointer dereference at
              virtual address 0000000000000000
[ 2691.144087]Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 2691.145120]Workqueue: rmnet_powersave_work qmi_rmnet_check_stats_2.cfi_jt
              [rmnet_core]
[ 2691.145147]pc : __skb_ext_put+0x24/0x1c0
[ 2691.145156]lr : skb_release_head_state+0x108/0x1bc
[ 2691.145317]__skb_ext_put+0x24/0x1c0
[ 2691.145324]skb_release_head_state+0x108/0x1bc
[ 2691.145331]kfree_skb+0x7c/0x4d0
[ 2691.145445]rmnet_qmap_send+0x128/0x258 [rmnet_core]
[ 2691.145534]dfc_qmap_set_powersave+0x154/0x2bc [rmnet_core]
[ 2691.145624]qmi_rmnet_check_stats_2+0xb4/0x488 [rmnet_core]
[ 2691.145636]process_one_work+0x248/0x820
[ 2691.145642]worker_thread+0x438/0xbd8
[ 2691.145649]kthread+0x150/0x200
[ 2691.145656]ret_from_fork+0x10/0x30

CRs-Fixed: 3023614
Change-Id: Ibb6063ad41a1b9407b4735dc6cf688038b352088
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-08-26 17:21:47 -06:00
Subash Abhinov Kasiviswanathan
ef13a42ae2 dfc: fix spinlock leak
In the DFC powersave work, the separate spin lock and unlock
of multiple qos structures could be out of sync during SSR
and results in spinlock leak after exiting the work.

This change consolidated the spinlock operations to avoid
multiple locking and unlocking, and fixed below issue:

BUG: workqueue leaked lock or atomic: kworker/0:9/0x00000201/1361
     last function: qmi_rmnet_check_stats_2.cfi_jt [rmnet_core]
1 lock held by kworker/0:9/1361:
(&qos->qos_lock){....}-{2:2}, at: rmnet_lock_unlock_all_flows+0xa4/0xdc

Change-Id: I10c1687a4f9993363dc631dee0b347faaa1067ab
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-08-18 09:59:34 -07:00
Kaustubh Pandey
6b6ee8b645 datarmnet : enable datarmnet for VT-upgrade
enable compilation for datarmnet for VT-upgrade
2021-08-03 15:54:27 +05:30
Subash Abhinov Kasiviswanathan
dd380cbece core: Add more data path tracing
Add traces to track TCP and UDP non fragmented packets in uplink and downlink.

CRs-Fixed: 3002908
Change-Id: I35643c38dff564964dcd9e04518cbe4655dd050b
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-07-29 02:08:27 -06:00
Subash Abhinov Kasiviswanathan
bc43c8213e core: Update condition for identifying TCP ACKs
The current condition only looks for packets which have only the ACK flag set.
This can cause SYN ACKs to get stuck behind other queued data.
This potentially manifests as delayed TCP connection setup.

Update the condition to allow all control packets through.

CRs-Fixed: 3001492
Change-Id: I0baab53bf4226eb891919040ee1c37c7b17d2910
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-07-29 02:07:58 -06:00
Subash Abhinov Kasiviswanathan
2bb9cb1f3c core: Add a stat to track chaining frags
Keep count of single fragments and other fragment counts in increments
of 6 upto the maximum possible 16.

CRs-Fixed: 2992022
Change-Id: I1b1c474e51cf1fe8856d53511ae7c374caa0b4a2
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-07-18 12:25:22 -06:00
Subash Abhinov Kasiviswanathan
1667d90ff5 dfc: hold wakelock while powersave timer is running
Powersave alarm timer could fail and delay suspend for 2 seconds
if the timer expires in 2 seconds. Change to hold a wakelock for
the actual duration of the timer so the suspend can be triggered
after timer expiration without delay.

Change-Id: Icc3cb835d4e174955e128c5a0c80198513213b2d
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-07-07 19:25:46 -07:00
Subash Abhinov Kasiviswanathan
3bbb9ff4ae core: Add stat to track chaining
Keep a count in increments of 10 upto 60 and a count for greater
than 60.

CRs-Fixed: 2984565
Change-Id: I20d81e03b1a592e3e69c6e83d1a827ae0c72f6b9
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-07-05 20:44:14 -06:00
Subash Abhinov Kasiviswanathan
35c1472b09 core: Add icmp tracing
Add events to trace the uplink and downlink ping sequences
through unfragmented icmp echo requests and echo responses.

CRs-Fixed: 2984040
Change-Id: Ibb9176b6f583beeab43e983c7b700248759d1e67
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-07-05 00:09:19 -06:00
Subash Abhinov Kasiviswanathan
daf959626b core: Update trace_print_skb_gso
Add support for UDP_GSO and also print the address, port, ip family
and transport protocol in each trace.

CRs-Fixed: 2983027
Change-Id: If98c9423f77c0f566b004b167c2b45eca560b0d7
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-07-02 01:14:59 -06:00
Subash Abhinov Kasiviswanathan
eedd0b9c6d core: Segment tso packets based on physical device limitations
UDP GSO packets from network stack currently do not honor the
gso_max_size limits set in a driver. As a result, there needs
to be some enforcement done at the driver itself prior to the
transmit to hardware.

Instead of setting the gso_max_size on the rmnet devices, the
gso_max_size is instead set on the physical device. This
ensures that the network stack processing happens with the
maximum gso size possible for the TCP case.

CRs-Fixed: 2981039
Change-Id: I5280ea79f868e2b933f2604f8a33fbf33687f76c
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-07-01 16:41:06 -06:00
Subash Abhinov Kasiviswanathan
d9ef2d2404 core: Add print string for TSO packets on LL channel
Add strings to display the cumulative result of the segmentation of
TSO packets on LL channel per rmnet device

CRs-Fixed: 2982506
Change-Id: I2454080d89c7a39a67004e0143463cd35772d45c
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-07-01 15:04:44 -06:00
qctecmdr
841892972c Merge "rmnet_core: Manually checksum csum_valid = 0 packets" 2021-06-17 03:17:12 -07:00
Sean Tranchetti
6899297aa7 rmnet_core: Manually checksum csum_valid = 0 packets
The csum_valid bit being set to zero in the v5 csum offload header has two
possible meanings. Either 1) the checksum is bad, or 2) the checksum was
not calculated. When a packet is received with such a header, we need to
manually checksum the packet to avoid reporting potentially valid packets
as having bad checksums.

Change-Id: I6a85d7a01c844be625c11c80ba381ac4dbd0366d
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2021-06-16 15:03:51 -07:00
Sean Tranchetti
80816d12be rmnet_core: Set proper maxtype element for NL attributes
maxtype should be set to the value of the highest attribute type that
is valid, not the number of valid attributes accepted. This ensures that
attributes with types higher than this number are ignored properly.

Change-Id: Ife53a4a9a7327a8d89e709320eb1c6cb50992922
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2021-06-16 10:34:39 -07:00
qctecmdr
a0c1611e3b Merge "qmi_rmnet: Dissect the ACKs rather than relying on helpers" 2021-06-13 15:57:56 -07:00
Subash Abhinov Kasiviswanathan
0ad2e0e18b qmi_rmnet: Dissect the ACKs rather than relying on helpers
Some drivers may not set the transport header when queueing packets
to the network stack. Network stack will end up setting the
transport offset to 0 in this case.

When these packets arrive in rmnet and have to be checked for
TCP ACKs, usage of standard helpers for tcp header is not possible
as it relies on the transport header offset to be set.

CRs-Fixed: 2965067
Change-Id: I50d53b7762fd75d1b17ccc6765abe65568aaa4e0
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-06-09 11:48:18 -06:00
Conner Huff
d4342c871d rmnet_core: Remove rmnet_ctl from compilation
Break dependency between rmnet_core and rmnet_ctl
so that we can compile rmnet_core without
rmnet_ctl on yocto based targets.

Change-Id: I3bfa3dbcd24f9343d073107f40b6d98c77aba881
Signed-off-by: Conner Huff <chuff@codeaurora.org>
2021-06-08 10:27:52 -07:00
qctecmdr
71d89a7197 Merge "rmnet_core: Check if port is valid before tx" 2021-06-03 19:51:42 -07:00
qctecmdr
6f4cca4aa9 Merge "rmnet_core: Prevent double trace define" 2021-06-03 16:54:08 -07:00
Conner Huff
dff15c9de8 rmnet_core: Check if port is valid before tx
Add check to ensure that rmnet_port value returned
by rmnet_get_port is not null before we go ahead
and try to queue up an skb to be transmitted via it.

Change-Id: I7890f4f2bcbb8dd300957c4fb12ec77f0412f4a6
Signed-off-by: Conner Huff <chuff@codeaurora.org>
2021-06-03 12:22:00 -07:00
Conner Huff
57b2b2d23f rmnet_core: Prevent double trace define
Trace path was getting defined twice unnecessarily.

Change-Id: I7d4febbd49fa900ebec22eabbfd97240010160cd
Signed-off-by: Conner Huff <chuff@codeaurora.org>
2021-06-02 16:34:35 -07:00
Subash Abhinov Kasiviswanathan
b5f52b0fe3 dfc: QMAP based powersave
Support DFC powersave using extended QMAP powersave command.

Change-Id: I3055212d8ecfe461bf9a6b35488269a59d4dec52
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-06-01 16:52:50 -07:00
Subash Abhinov Kasiviswanathan
9c7db82138 dfc_qmi: Honor tcp ancillary bit even when there is no change in grant
The tcp ancillary bit has been updated to be sent in almost all cases
unlike earlier where this was sent in case of TCP DL traffic.
This bit will now not be set only in case of adverse scenarios, so
this change ensures that the ACK queue state is updated in case the
ancillary bit is unset.

CRs-Fixed: 2957344
Change-Id: I4e1f26c9d3fabc64401284e36b48d82a4f3a5161
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-05-28 12:37:35 -06:00
Subash Abhinov Kasiviswanathan
257ac448b3 Android.mk: Replace TARGET_PRODUCT with TARGET_BOARD_PLATFORM
This provides the flexibility to use TARGET_BOARD_PLATFORM to maintain
a common codebase while differentiating between products with
TARGET_PRODUCT.

CRs-Fixed: 2955427
Change-Id: I824730142b6a68968c6bb44fec841ed49642ef7a
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-05-26 16:54:39 -06:00