Commit graph android_kernel_sony_sdm845/net/rmnet_data/rmnet_data_handlers.c
Message SHA1
net: rmnet_data: Check for endpoint validity when demuxing
In case an invalid mux id is passed, an invalid device lookup is
done leading to passing on the packet to stack incorrectly rather
than consuming them.

CRs-Fixed: 2181180
Change-Id: Iad905e932b49eda00a7d91e906f0ac0ca44cdb59
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Subash Abhinov Kasiviswanathan   commited 2018-01-25 23:19:57 -07:00
4b5151f109
net: rmnet_data: Use hrtimer for UL aggregation timer
The delay argument in schedule_delayed_work(struct delayed_work
*dwork, unsigned long delay) API is jiffies. The system tick for
seems to be 100Hz, so the minimum time resolution for the work to
be scheduled is 10ms.

Switch to hrtimer to achieve 3 ms granularity with a current timer
of 1ms for the flush thread. A workqueue is immediately scheduled
in the same context after this timer expiry to do the tx work.

CRs-Fixed: 2157214
Change-Id: I29cbbee417e84b101ed34c0d29c2731bd52c3ec5
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Subash Abhinov Kasiviswanathan   commited 2017-12-18 12:19:16 -07:00
08fed02b9e
net: rmnet_data: Always try to linearize when UL aggregation is on
Skipping UL aggregation if the packet was linear was causing out
of order packets. If linearization fails, pass up the packet as is.
Also skip padding if using version 3 or v4 when using UL aggregation.

CRs-Fixed: 2141234
Change-Id: I711668ecf2a3e6807f2270b4b107f4a2a3d21654
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Subash Abhinov Kasiviswanathan   commited 2017-11-10 15:26:14 -07:00
54448f2b55
net: rmnet_data: Skip UL aggregation for ping packets
ICMP packets could be potentially stuck behind aggregated traffic
if UL aggregation is enabled on rmnet_data. This results in
increased latencies during ping tests as the workqueues for these
packets are scheduled at non deterministic times.

CRs-Fixed: 2131879
Change-Id: I19208301b5674749aa2f1dee65a9226eda364c85
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Subash Abhinov Kasiviswanathan   commited 2017-11-08 18:53:37 -07:00
bf783bade0
net: rmnet_data: Fix assignments, reads, and logic
Global variables are no longer assigned values. Instead
flush meta data is handled and tracked at per end
point basis.

Reduce the number of register reads for timer. Leverage
value which has already been read earlier in function.

Change-Id: If0f3362aff1f92c94d05367c4b6428b897ff6ede
Signed-off-by: Conner Huff <chuff@codeaurora.org>

Conner Huff   commited 2017-11-06 11:13:18 -08:00
a9112ff270
Merge "net: rmnet_data: Fix comments on code review"
Linux Build Service Account   authored and   Gerrit - the friendly Code Review server   commited 2017-10-27 18:19:27 -07:00
14c7ab7005
net: rmnet_data: Fix comments on code review
- Remove redundant checks in tx / rx fixup.
- Remove debug aggregation counter
- Remove unused recycle handler
- Add CAP_NET_ADMIN checks for set IOCTLs
- Simplify the packet deliver code

CRs-Fixed: 2111801
Change-Id: I14c02462c27b319f7517caa178f25a8efa22abeb
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Subash Abhinov Kasiviswanathan   commited 2017-10-27 13:09:14 -06:00
29e6452e14
net: rmnet_data: validate csum in SW
Do SW checksum validation if rmnet_data checksum
validation fails.

Change-Id: Ifff229dc1e7eb592d58fc66ea278debb292b89aa
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>

Ashwanth Goli   authored and   Tejaswi Tanikella   commited 2017-10-24 15:18:41 +05:30
3965fbfac7
net: rmnet_data: Skip UL aggregation for non linear packets
Using UL aggregation for non linear data is not efficient since
we are copying data from a non linear segment to a linear buffer.
As a result, we lose the advantages of GSO and increase our RTT.

CRs-Fixed: 2117151
Change-Id: I7963c4a19531c53deaf5e50dc408ba3faea41c35
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Subash Abhinov Kasiviswanathan   authored and   Gerrit - the friendly Code Review server   commited 2017-09-27 11:27:26 -07:00
c64a7803e4
net: rmnet_data: Unset logical end points in bridge mode
We clean up the logical end points only for the un-registering device
in bridge mode. However, the other physical end point's local end
point still points to the the un-registered device.

This may lead up to a crash if one of the physical devices in bridge
mode is un-registered. Fix this by unsetting the local endpoint.

It is still possible that packets in a different context across cores
might try to access this data. This usually manifests as packets
requesting a very large headroom. Handle this by dropping these stale
skb's.

CRs-Fixed: 1098513
Change-Id: I1ba4d877a6ed3eca66946fe056938f0927bcd9a5
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Ashwanth Goli   authored and   Subash Abhinov Kasiviswanathan   commited 2017-07-18 14:13:22 -06:00
c85bfbe2e8
net: rmnet_data: Optimized GRO for single flow
Port single flow dynamic GRO changes into rmnet driver. This
feature uses configurable parameters that determine when GRO
should be flushed based on both timing and receive byte count.
Although the parameters are initially set, they dynamically
fluctuate based on incoming traffic.

CRs-Fixed: 1113125
Change-Id: I7469118d3108e0c9f71c4f50efd8ceebfb324a63
Signed-off-by: Conner Huff <chuff@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Conner Huff   authored and   Subash Abhinov Kasiviswanathan   commited 2017-02-23 19:37:37 -07:00
f90a250c4a
net: rmnet_data: Handle leaked packets when adding MAP fields in TX
Some creators of skb's may fail to set sufficient headroom or
tailroom to stamp the MAP header or tailroom respectively when
transmitting packets to rmnet_data.

In these cases, rmnet_data was failing to free these packets which
lead to out of memory scenarios in low memory targets. Free these
skb's in these scenarios.

CRs-Fixed: 1086873
Change-Id: I8bd2eb93393766bf9c301766e525354770577e0a
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Subash Abhinov Kasiviswanathan   commited 2017-02-03 15:54:10 -07:00
991811c150
net: rmnet_data: Add snapshot of rmnet_data driver
This is a snapshot of the rmnet_data driver taken as of msm-4.4.
commit 5da00923b1544ba ("rmnet_data: Changing format specifier to
%pK").

Additionally, fix some style issues reported by checkpatch.

CRs-Fixed: 1078373
Change-Id: Idb2df22e61803e04a01db64ea5e9d1e93ae92e09
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Subash Abhinov Kasiviswanathan   commited 2016-11-01 20:02:26 -06:00
2139ce8a5c