Commit Graph

31 Commits

Author SHA1 Message Date
Subash Abhinov Kasiviswanathan
652abaa760 core: Add list removal in tso segmentation logic
Transmitting a packet without removing it from the segment list causes
the entire chain to be incorrectly transmitted multiple times. Fixes
the following-

 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020
 Mem abort info:
   ESR = 0x96000005
   EC = 0x25: DABT (current EL), IL = 32 bits
   SET = 0, FnV = 0
   EA = 0, S1PTW = 0
   FSC = 0x05: level 1 translation fault
 Data abort info:
   ISV = 0, ISS = 0x00000005
   CM = 0, WnR = 0
 user pgtable: 4k pages, 39-bit VAs, pgdp=00000000b32f8000
 [0000000000000020] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
 pstate: 42400005 (nZcv daif +PAN -UAO +TCO -DIT -SSBS BTYPE=--)
 pc : __skb_clone+0xfc/0x144
 lr : __skb_clone+0x24/0x144
 Call trace:
  __skb_clone+0xfc/0x144
  skb_clone+0x94/0xe0
  dev_queue_xmit_nit+0x188/0x40c
  xmit_one+0x60/0x284
  sch_direct_xmit+0x184/0x3dc
  __dev_xmit_skb+0x47c/0x97c
  __dev_queue_xmit+0x2cc/0x774
  dev_queue_xmit+0x14/0x20
  rmnet_egress_handler+0x458/0x608 [rmnet_core]
  rmnet_vnd_start_xmit+0x3a0/0x708 [rmnet_core]
  xmit_one+0xd0/0x284
  sch_direct_xmit+0x184/0x3dc
  __dev_xmit_skb+0x47c/0x97c
  __dev_queue_xmit+0x2cc/0x774
  __bpf_redirect+0x214/0x2a0
  skb_do_redirect+0xe4/0xbbc
  __dev_queue_xmit+0x6bc/0x774
  neigh_connected_output+0xd8/0x110
  ip_finish_output2+0x3c4/0x548
  __ip_finish_output+0x194/0x244
  ip_finish_output+0x4c/0xec
  ip_output+0x114/0x23c
  __ip_queue_xmit+0x50c/0x610
  ip_queue_xmit+0x14/0x20
  __tcp_transmit_skb+0x770/0xc54
  tcp_write_xmit+0x78c/0x1088
  __tcp_push_pending_frames+0x38/0xd0
  tcp_rcv_established+0x3fc/0xa58
  tcp_v4_do_rcv+0x9c/0x2f8
  tcp_v4_rcv+0xbbc/0xeac
  ip_protocol_deliver_rcu+0x6c/0x2b0
  ip_local_deliver+0xd4/0x1e4
  ip_rcv+0x7c/0x15c
  __netif_receive_skb+0xdc/0x174
  process_backlog+0xf0/0x3b4
  __napi_poll+0x48/0x224
  net_rx_action+0x118/0x398
  _stext+0x14c/0x5c0
  __irq_exit_rcu+0x74/0x1f8
  handle_domain_irq+0xb4/0x120
  gic_handle_irq.34241+0x50/0x340
  call_on_irq_stack+0x40/0x70
  do_interrupt_handler+0x3c/0x50
  el1_interrupt+0x30/0x5c
  el1h_64_irq_handler+0x18/0x24
  el1h_64_irq+0x7c/0x80
  cpuidle_enter_state+0x310/0x784
  do_idle+0x304/0x52c
  cpu_startup_entry+0x80/0x8c
  secondary_start_kernel+0x1fc/0x23c
  __secondary_switched+0x98/0x9c

CRs-Fixed: 3328368
Change-Id: I56e29466d7b5883b554b19c3f3b3f5ba73f8d5a6
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
2022-12-01 22:18:28 -08:00
Subash Abhinov Kasiviswanathan
f41ac5e8ca core: Enable drivers for pineapple
Enable rmnet core and ctl drivers and update the kernel APIs to match
the appropriate kernel.

This change also adds support for the inclusion of the IPA kernel
headers from a non-core kernel location. This is achieved using the
flag KBUILD_REQUIRED_KOS.

Additionally, remove all deprecated code.

CRs-Fixed: 3311558
Change-Id: I9317f53ca8b1a370b6a5eb86734057399aee1d48
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
2022-11-08 23:19:56 -07: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
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
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
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
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
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
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
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
Sean Tranchetti
42e9497010 rmnet_core: segment ULSO skbs on LL channel
ULSO is not supported on the LL endpoint. If such skbs are received by the
rmnet driver, they must be segmented in software before transmitting them.

Change-Id: I0103d06c6bfa8eb96cfbde85f68b1b45034a93e5
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2021-05-14 10:31:04 -07:00
Subash Abhinov Kasiviswanathan
b8552944d5 rmnet_core: support low latency channel switch
Add support to switch bearers between default and lower latency
channels via QMAP commands.

Change-Id: I6662f59c713e8e3ab7409f50871bec11d9908c67
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-05-12 17:03:12 -07:00
Sean Tranchetti
b38dff7d79 rmnet_core: Add Low Latency framework
Packets are now sent over a dedicated MHI channel when indicated by the
DFC driver.

New dedicated channel is controlled by rmnet driver. Buffers are allocated
and supplied to it as needed from a recyclable pool for RX on the channel,
and packets will be sent to it and freed manually once the channel
indicates that they have been sent.

Low latency packets can be aggregated like standard QMAP packets, but have
their own aggregation state to prevent mixing default and low latency
flows, and to allow each type of flow to use their own send functions
(i.e. dev_queue_xmit() versus rmnet_ll_send_skb()).

Low latency packets also have their own load-balancing scheme, and do not
need to use the SHS module for balancing. To facilitate this, we mark the
low latency packets with a non-zero priority value upon receipt from the
MHI chainnel and avoid sending any such marked packets to the SHS ingress
hook.

DFC has been updated with a new netlink message type to handle swapping a
list of bearers from one channel to another. The actual swap is performed
asynchronously, and separate netlink ACKs will be sent to the userspace
socket when the switch has been completed.

Change-Id: I93861d4b004f399ba203d76a71b2f01fa5c0d5d2
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2021-05-12 17:02:51 -07:00
Subash Abhinov Kasiviswanathan
eec13e2c69 core: Add hooks for perf tether ingress and egress
Define the hooks to be used be perf tether ingress and egress.

CRs-Fixed: 2813607
Change-Id: I68c4cc1e73c60e784fd4117679b3a373d29f539c
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-04-26 19:39:44 -06:00
Subash Abhinov Kasiviswanathan
dad91a4eff rmnet_core: Add support for TSO
This adds support for the new transmit offload header as well as
the handling needed for it in the core driver.

CRs-Fixed: 2810638
Change-Id: I8ce2e0772209faf3d585e7d9d8d56eceb695d586
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-03-07 12:55:54 -07:00
Conner Huff
4fe7a4add4 datarmnet: Fastforward core from data-kernel.lnx.1.1 to data-kernel.lnx.1.2
Catches up to commit b4d76675a6feeb57f7188d5354e1cf82b7adb012.

Change-Id: Ib1f00be9799712bd4ab0381cde648287f98a61a1
Signed-off-by: Conner Huff <chuff@codeaurora.org>
2021-02-01 18:46:12 -08:00
Conner Huff
5c8f59b9b2 rmnet_core: featurize ftraces
For compilation on LE targets

Change-Id: I661600cfaee256b5ff37da93b5bd7638d3039f42
Signed-off-by: Conner Huff <chuff@codeaurora.org>
2020-09-01 00:05:34 -06:00
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
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
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
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