Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7500cc9 authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan
Browse files

net: rmnet_data: Optimize the UL aggregation skip logic



Optimize for the IPv6 normal ping case instead of the
fragmentation scenario. Also, check for IPv6 explicitly
rather than directly disecting the packet.

CRs-Fixed: 2131879
Change-Id: Idee5c7d52972d06aee6ac6d71ebd5d1c3c875f9f
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent fc9ce0e0
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -753,18 +753,18 @@ int rmnet_ul_aggregation_skip(struct sk_buff *skb, int offset)

		if (ip4h->protocol == IPPROTO_ICMP)
			is_icmp = 1;
	} else {
	} else if ((skb->data[offset]) >> 4 == 0x06) {
		struct ipv6hdr *ip6h = (struct ipv6hdr *)(packet_start);

		if (ip6h->nexthdr == NEXTHDR_FRAGMENT) {
		if (ip6h->nexthdr == IPPROTO_ICMPV6) {
			is_icmp = 1;
		} else if (ip6h->nexthdr == NEXTHDR_FRAGMENT) {
			struct frag_hdr *frag;

			frag = (struct frag_hdr *)(packet_start
						   + sizeof(struct ipv6hdr));
			if (frag->nexthdr == IPPROTO_ICMPV6)
				is_icmp = 1;
		} else if (ip6h->nexthdr == IPPROTO_ICMPV6) {
			is_icmp = 1;
		}
	}