Commit Graph

28 Commits

Author SHA1 Message Date
Ashwanth Goli a91805fcfe 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>
2017-10-17 05:49:29 -07:00
Subash Abhinov Kasiviswanathan 1ee50c4425 net: rmnet_data: Stop adding pad bytes for MAPv3 uplink packets
Hardware does not require pad bytes in egress packets when uplink
aggregation is not enabled.

CRs-Fixed: 1002396
Change-Id: I86459b7bc18da16b66f6c701ac324f28be8848fa
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-09-21 04:29:42 -07:00
Subash Abhinov Kasiviswanathan f0db5bc32a net: rmnet_data: Stop adding pad bytes for MAPv4 uplink packets
Hardware does not handle pad bytes in egress packets when uplink
aggregation is not enabled. This is due to the translation support
added on hardware for MAPv4.

Change-Id: Ic246a4548561450035d5252221032d72eff44518
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-09-21 04:20:57 -07:00
Harout Hedeshian ad38d8a936 net: rmnet_data: process MAP commands only after frame deaggregation
It is not guaranteed that MAP commands will be in their own frame. Some
commands may be embedded in a large aggregated frame of datagrams. This
patch forces MAP command processing to occur after the deaggregation
routing. This has the side-effect of incurring a malloc/memcpy latency
penalty for each MAP command. This also introduces a side-effect where
every packet after de-aggregation will need to be inspected for the
cmd bit.

Change-Id: Icc5ad1e7d622a35883f858c2c132c9679f43c79e
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2016-07-04 03:47:16 -07:00
Subash Abhinov Kasiviswanathan b380a1fea9 net: rmnet_data: Change the print format for addresses
Print format %p displays the kernel address while bypassing the
kptr_restrict sysctl settings.

Change the print format for addresses from %p to %pK. If
kptr_restrict is enabled, addresses are printed as zeroes. To view
the actual addresses, disable kptr_restrict by -
echo 0 > /proc/sys/kernel/kptr_restrict

CRs-Fixed: 987054
Change-Id: Icb8ef62c8263ae7b17d6883c0e6a1c93d2156a6a
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-06-22 03:31:59 -07:00
Subash Abhinov Kasiviswanathan d77a69adc1 net: rmnet_data: Add support for MAPv4 data format
Add the MAPv4 ingress and data format handlers. MAPv4 requires the
checksum for uplink TCP and UDP packets to be 1's complemented
before passing the packet onto the physical netdevice.

This workaround is needed due to failures seen in hardware while
processing translated packets.

Change-Id: Ib79382fa7e8b2bd0c1adbe68b8de75f1602df10b
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2015-09-04 15:13:02 -07:00
Subash Abhinov Kasiviswanathan 4a6f25ede6 net: rmnet_data: Fix memory corruption in gro tracepoint
skb's passed to the network stack through napi_gro_receive can
be freed before it is used in the gro tracepoint to print the
ingress device.

Fix this by removing the skb as an argument. We could copy the
skb->dev to a string before passing it to napi_gro_receive and then
use it as an argument for the tracepoint but that would mean
unnecessary code in hotpath for debugging purposes.

Change-Id: I82055dbc9b84f405e8f63f7b2eeb7c80e5ae0c3a
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2015-06-16 09:26:50 -07:00
Sivan Reinstein 1a97c2276f net: rmnet_data: adding support to GRO
Adding support to GRO (Generic Receive Offload) in rmnet_data
interfaces.
Rmnet_data interface invokes the GRO API napi_gro_receive() using
the napi_struct which belongs to the current NAPI context, as
given by the network stack.

CRs-fixed: 784626
Change-Id: I183ba73f176cb0ee0ccb94cc2d77209bb26f7506
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
2015-04-30 16:56:14 -06:00
Sivan Reinstein 6b9a08570c net: rmnet_data: add support for UL MAP based checksum offload
Add UL checksum offload routines for MAPv3. Can bypass checksum software
for IPv4/IPv6 TCP/UDP protocols.
Set rmnet_data VNDs hw_flags to NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM to
define the checksum offload abilities.
Add UL checksum meta-info header for IPv4/IPv6 TCP/UDP packets for which
UL checksum is being offloaded.

CRs-fixed: 731693
Change-Id: Ief139d357b528aead66acfe39a5227328b8fbf93
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
2014-11-24 10:07:31 +02:00
Harout Hedeshian 773dfb64dd net: rmnet_data: Checksum offload handle IPv4 UDP frames with 0 checksum
Checksum offload routine should skip checksum fixup computation on
IPv4 UDP packets which have the checksum field set to 0 by the sender.
This is allowed by RFC768. Packets are marked as checksum unnecessary
and shipped up the stack as-is.

CRs-Fixed: 755544
Change-Id: I0432c3e1b25196134ecc8bbbe23c9cab46666d5c
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-11-13 08:40:20 -07:00
Harout Hedeshian 5b05491d22 net: rmnet_data: Add counters for downlink checksum offload return codes
Added counter array to /sys/module/rmnet_data/parameters/checksum_dl_stats
for non-realtime analysis of checksum offload.

Change-Id: I749c09147325fd0f871c34ff17e2546b68898faa
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-08-26 16:03:42 -06:00
Sivan Reinstein 0db8fc47f0 net: rmnet_data: add support for DL MAP based checksum offload
Add DL checksum offload routines for MAPv3. Can bypass checksum software
for IPv4/IPv6 TCP/UDP protocols.

CRs-fixed: 692334
Change-Id: Ic13a5d9a1ebfdc57b6eb53ee93da92c3aee547b1
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
2014-07-22 15:35:01 +03:00
Harout Hedeshian c4c80c5459 net: rmnet_data: Move MAP header definition to UAPI
Expose the MAP header to the rest of the kernel and user space. Useful for
making various parts of the kernel MAP aware. Keeping consistency with
other networking procols by exposing protocol headers to user space with
a header file in UAPI.

CRs-Fixed: 681280
Change-Id: Ic7f414f926f68531418725f971ab2b44459f5ea1
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-06-23 07:45:21 -06:00
Subash Abhinov Kasiviswanathan b8e4482976 net: rmnet_data: modify the packet logging
skb->tail and skb->end are defined as character pointers in 32 bit
environments and as integers in other environments. Fix compilation
issues seen in the packet logging functions as a result of the data
type mismtach in 64 bit environments.

CRs-fixed: 665364
Change-Id: Ie70e01ce0678947d9c8cd924fe99b89ce319d4e5
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2014-06-06 12:51:21 -06:00
Harout Hedeshian a148f90880 net: rmnet_data: adding new trace points
Added new trace points for flow control events and
aggregation/deaggregation.

CRs-Fixed: 661459
Change-Id: I22e5b441f5bb8ff055b0577954cc9f6285b68a74
Acked-by: Sivan Reinstein <sivanr@qti.qualcomm.com>
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-05-29 11:21:59 -06:00
Subash Abhinov Kasiviswanathan 10f58a4316 net: rmnet_data: add cleanup in rmnet_config_exit
Add a call to unregister_netdevice_notifier in rmnet_config_exit,
and fix some compilation warnings.

CRs-Fixed: 633585
Change-Id: I0e61c5460b927c3348f4e9815bbd9f842488f14d
Acked-by: Sivan Reinstein <sivanr@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2014-04-09 23:25:30 -06:00
Harout Hedeshian 7627243455 net: rmnet_data: Add support for ftrace events
Adding initial support for ftrace events in order to help with
profiling and debugging. This initial set of events covers the
ingress and egress handlers.

Change-Id: I296d6fb9d009d8fdc2061e17d25e1275ee0a8a12
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-02-10 18:53:27 -07:00
Harout Hedeshian ce4611b1a9 net: rmnet_data: Add newline character debug packet dump
The lack of newline characters causes messy printouts over serial.
This patch corrects the problem for easier readability.

Change-Id: I38df34eb4a705d8c0fcd3243b7e756967bc7d5a9
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-01-31 10:29:44 -07:00
Harout Hedeshian b6ca4b8030 net: rmnet_data: Enhanced counters
Added performance counters to various key places in RmNet Data
data path.

CRs-Fixed: 600629
Change-Id: Iba50c86665e181e09525e9538a540e09e526e16f
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-01-31 10:29:33 -07:00
Harout Hedeshian 1070484ab7 net: rmnet_data: Enhance logging macros to remove duplicated code
Logging macros now enforce that function names are printed, and
newlines are inserted at the end. The start of log messages are
now standardize.

CRs-Fixed: 600629
Change-Id: I91dae00c331af80954b93eba1f7be2889c569276
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-01-24 08:15:03 -07:00
Harout Hedeshian 0a6fdc0f7b net: rmnet_data: Add support for guaranteed padding
Added new parameter tail_spacing to
RMNET_NETLINK_SET_LINK_INGRESS_DATA_FORMAT in order to support
an additional fixed padding on packets. Required to support RNDIS
tethering.

CRs-Fixed: 579184
Change-Id: I58bbbfbaa68a28b25a96f52b04165285de9c24ef
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-01-24 08:14:46 -07:00
Harout Hedeshian ff7fa10e8e net: rmnet_data: Modifying the ingress handler to support MAP bridging
This patch modified the main ingress handler to not drop MAP packets
when in bridge mode. This is required to support bridging of MAP
packets between two endpoints.

CRs-Fixed: 590888
Change-Id: If0b6f6434ec95c36e0f46bbe70ea65fa50b03b15
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Harout Hadeshian <harouth@codeaurora.org>
2014-01-20 10:51:49 -07:00
Harout Hedeshian 96b90ce3b0 net: rmnet_data: Enhancements to support SSR
Cleaned up refcount on get_dev_by_name.
Added new APIs to support cleanup of configuration and virtual devices.
Added explicit reference managment in association/un-association
and when setting/unsetting logical EP.

CRs-Fixed: 596227
Change-Id: Ic67bb649b0f0420d9a1e4bf5664ed63c0ff7d8bf
Signed-off-by: Harout Hadeshian <harouth@codeaurora.org>
2014-01-18 10:16:54 -07:00
Linux Build Service Account 0e076ea422 Merge "net: rmnet_data: In-band flow control" 2013-11-20 06:15:44 -08:00
Harout Hedeshian c9132a2781 net: rmnet_data: In-band flow control
Implement MAP based in-band flow control. Added 2 new configuration
messages to allow adding and deleting flow handles. Added handlers
in VND for flow control events. Added flow control command handler
in rmnet_map_commands.

CRs-fixed: 568534
Change-Id: Ica52e4ad89430c9fa5e2b38e389ee6bc91de2e9b
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2013-11-19 13:12:47 -08:00
Harout Hedeshian 9bd9efd71f net: rmnet_data: Set SKB protocol for outbound MAP packets
Set the skb->protocol field to ETH_P_MAP for egress packets which
have MAP enabled. Required for lower level drivers to ensure that
only MAP packets are being transmitted.

CRs-Fixed: 554883
Change-Id: I6fa852344ef36e079cc610cbed152555aae9d6f2
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2013-10-31 07:05:32 -07:00
Harout Hedeshian 313dca20cd net: rmnet_data: Change aggregation copy mode for compat
Change SKB copy and delivery mode to fix certain error
modes when running ingress deaggregation

CRs-Fixed: 565123
Change-Id: If23cee6a0de6b189b2c528423df52555e1879bc3
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2013-10-28 07:43:48 -06:00
Harout Hedeshian 3858fdc45c RmNet Data: Initial release
RmNet Data driver provides a transport agnostic MAP (multiplexing and
aggregation protocol) support in embedded and bridge modes. Module
provides virtual network devices which can be attached to any IP-mode
physical device. This will be used to provide all MAP functionality
on future hardware in a single consistent location.

CRs-Fixed: 525675
Change-Id: I739947c9c3de008974dd485a74e9953ba2cbb75e
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2013-09-27 15:48:02 -06:00