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>
Support added for monaco_go such that modules will be compiled
for monaco_go platform as well.
Change-Id: I84dcb542cef7ee88dbe1d61447512230819134c4
Signed-off-by: Kaustubh Pandey <kapandey@codeaurora.org>
Ensure that the generic netlink response has a memset payload
before sending to userspace.
Change-Id: Ie2fa92ce80bb3c0716e779cebeaedb2d31d759c1
Acked-by: Ryan Chapman <rchapman@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
During rmnet unregistration, the real device rx_handler is first cleared
followed by the removal of rx_handler_data after the rcu synchronization.
Any packets in the receive path may observe that the rx_handler is NULL.
However, there is no check when dereferencing this value to use the
rmnet_port information.
This fixes following splat by adding the NULL check.
Unable to handle kernel NULL pointer dereference at virtual
address 000000000000000d
pc : rmnet_rx_handler+0x124/0x284
lr : rmnet_rx_handler+0x124/0x284
rmnet_rx_handler+0x124/0x284
__netif_receive_skb_core+0x758/0xd74
__netif_receive_skb+0x50/0x17c
process_backlog+0x15c/0x1b8
napi_poll+0x88/0x284
net_rx_action+0xbc/0x23c
__do_softirq+0x20c/0x48c
CRs-Fixed: 2818544
Change-Id: I766db0b75469f2f049eb226daa7de9ba413d8f59
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Previously wq was designated as WQ_MEM_RECLAIM.
Remove this as it is unnessesary and will result in all notifier
queueing of work and to also be on wqs designated as WQ_MEM_RECLAIM.
Change-Id: I3248e3aef1594b93c16a1ab8c7c6740d53f68886
Acked-by: Raul Martinez <mraul@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Now that the hardware will coalesce additional flags into the RSC frame,
we must check the TCP flags explicitly and remove ones that make no sense
when segmenting the RSC frame for any reason.
In particular, we must check for TCP_FIN, and clear this flag from any
segmetents of the RSSC frame except the last to avoid breaking the TCP
stream integrity.
Change-Id: I7f80437991821ab29cd190a9d5bd45e9cdb4c333
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
When copying the QMAP header during deaggregation, the size of the data
to copy was incorrectly passed to skb_copy_bits() as the size of the
pointer instead of the struct. This lead to copying more data onto the
stack than there was room for.
Change-Id: I19208a8df2d8ce25a22fff95b71f1c56dcddec89
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
After the introduction of scatter gather support, it's possible that the
QMAP headers may be split across pages. This patch adds proper handling
for the headers during deaggregation from the original SKB from the
physical device when building the descriptors used elsewhere in the rmnet
driver.
Change-Id: If62cf8b4993fe01b6f43e9f16f08c134d18437b8
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
This is done to randomize the IPv6 address generation.
This also assigns a different IID to every rmnet interface.
CRs-Fixed: 2771389
Change-Id: I427481f1eeda098a2ebbd0c8ce88030eb0cd6cfd
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Fix warnings introduced by the introduction of scatter-gather support.
Change-Id: I0a12f19a1572989d259e6d8b5b12146a7c5c7cd1
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
This patch adds the necessary handling for the physical device driver to
use multiple pages to hold data in the SKBs. Essentially, the following
changes are implemented:
- rmnet_frag_descriptor struct now hold a list of frags, instead of a
single one. Pushing, pulling, and trimming APIs are updated to use
this new format.
- QMAP deaggregation now loops over each element in skb_shinfo->frags
looking for data. Packets are allowed to be split across mutliple
pages. All pages containing data for a particular packet will be added
to the frag_descriptor struct representing it.
- a new API, rmnet_frag_header_ptr() has been added for safely accessing
packet headers. This API, modeled after skb_header_pointer(), handles
the fact that headers could potentially be split across 2 pages. A
pointer to the location of the header is returned in the usual case
where the header is physically contiguous. If not, the header is
linearized into the user-provided buffer to allow normal header struct
read access.
- this new header access API is used in all places on the DL path when
headers are needed, including QMAP command processing, QMAPv1
handling, QMAPv5 checksum offload, and QMAPv5 coalescing.
- RSB/RSC segmentation handling is updated to add all necessary pages
containing packet data to the newly created descriptor. Additionally,
the pages containing L3 and L4 headers are added as well, as this
allows easier downstream processing, and guarantees that the header
data will not be freed until all packets that need them have been
converted into SKBs.
- as all frag_descriptors are now guaranteed to contain the L3 and L4
header data (and because they are no longer guaranteed to be on the
same page), the hdr_ptr member has been removed as it no longer serves
a purpose.
Change-Id: Iebb677a6ae7e442fa55e0d131af59cde1b5ce18a
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Re-send QMAP DFC_CONFIG command if no ack is received upon
first QMAP indication.
Change-Id: I33ec5cbbf3550d1df03ca1dd990bf8ad58ad9582
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
When calculating the length of the IPv6 header chain, lengths of the IPv6
extension headers are not checked against the overall packet lengths and
thus it's possible to parse past the end of the packet when the packet is
malformed.
This adds the necessary bounds checking to ensure that parsing stops if the
end of the packet is reached to avoid the following:
Unable to handle kernel paging request at virtual address
pc : rmnet_frag_ipv6_skip_exthdr+0xc0/0x108 [rmnet_core]
lr : rmnet_frag_ipv6_skip_exthdr+0x68/0x108 [rmnet_core]
Call trace:
rmnet_frag_ipv6_skip_exthdr+0xc0/0x108 [rmnet_core]
DATARMNET29e8d137c4+0x1a0/0x3e0 [rmnet_offload]
rmnet_frag_ingress_handler+0x294/0x404 [rmnet_core]
rmnet_rx_handler+0x1b4/0x284 [rmnet_core]
__netif_receive_skb_core+0x740/0xd2c
__netif_receive_skb+0x44/0x158
Change-Id: Ib2e2ebce733bd4d14a3dfc175133638b15015277
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Detects TCP pure acks so they can be put into the dedicated TX queues
even if they contains various options.
Change-Id: I6a9b714ccb58616ff49a150467d33a348d88ec64
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>