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

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

Revert "ipv4/GRO: Make GRO conform to RFC 6864"



This reverts commit ae4daabaeb49674 ("ipv4/GRO: Make GRO conform
to RFC 6864").

CRs-Fixed: 1015375
Change-Id: I637bebfe07f041d6bf7b4905b22fe3693cbaa264
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent bc936131
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -4030,7 +4030,6 @@ static void gro_list_prepare(struct napi_struct *napi, struct sk_buff *skb)
		unsigned long diffs;
		unsigned long diffs;


		NAPI_GRO_CB(p)->flush = 0;
		NAPI_GRO_CB(p)->flush = 0;
		NAPI_GRO_CB(p)->flush_id = 0;


		if (hash != skb_get_hash_raw(p)) {
		if (hash != skb_get_hash_raw(p)) {
			NAPI_GRO_CB(p)->same_flow = 0;
			NAPI_GRO_CB(p)->same_flow = 0;
+7 −18
Original line number Original line Diff line number Diff line
@@ -1350,7 +1350,6 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head,


	for (p = *head; p; p = p->next) {
	for (p = *head; p; p = p->next) {
		struct iphdr *iph2;
		struct iphdr *iph2;
		u16 flush_id;


		if (!NAPI_GRO_CB(p)->same_flow)
		if (!NAPI_GRO_CB(p)->same_flow)
			continue;
			continue;
@@ -1374,24 +1373,14 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head,
			(iph->tos ^ iph2->tos) |
			(iph->tos ^ iph2->tos) |
			((iph->frag_off ^ iph2->frag_off) & htons(IP_DF));
			((iph->frag_off ^ iph2->frag_off) & htons(IP_DF));


		NAPI_GRO_CB(p)->flush |= flush;
		/* Save the IP ID check to be included later when we get to

		 * the transport layer so only the inner most IP ID is checked.
		/* We must save the offset as it is possible to have multiple
		 * This is because some GSO/TSO implementations do not
		 * flows using the same protocol and address pairs so we
		 * correctly increment the IP ID for the outer hdrs.
		 * need to wait until we can validate this is part of the
		 * same flow with a 5-tuple or better to avoid unnecessary
		 * collisions between flows.  We can support one of two
		 * possible scenarios, either a fixed value with DF bit set
		 * or an incrementing value with DF either set or unset.
		 * In the case of a fixed value we will end up losing the
		 * data that the IP ID was a fixed value, however per RFC
		 * 6864 in such a case the actual value of the IP ID is
		 * meant to be ignored anyway.
		 */
		 */
		flush_id = (u16)(id - ntohs(iph2->id));
		NAPI_GRO_CB(p)->flush_id =
		if (flush_id || !(iph2->frag_off & htons(IP_DF)))
			    ((u16)(ntohs(iph2->id) + NAPI_GRO_CB(p)->count) ^ id);
			NAPI_GRO_CB(p)->flush_id |= flush_id ^
		NAPI_GRO_CB(p)->flush |= flush;
						    NAPI_GRO_CB(p)->count;
	}
	}


	NAPI_GRO_CB(skb)->flush |= flush;
	NAPI_GRO_CB(skb)->flush |= flush;
+3 −0
Original line number Original line Diff line number Diff line
@@ -238,6 +238,9 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
		/* flush if Traffic Class fields are different */
		/* flush if Traffic Class fields are different */
		NAPI_GRO_CB(p)->flush |= !!(first_word & htonl(0x0FF00000));
		NAPI_GRO_CB(p)->flush |= !!(first_word & htonl(0x0FF00000));
		NAPI_GRO_CB(p)->flush |= flush;
		NAPI_GRO_CB(p)->flush |= flush;

		/* Clear flush_id, there's really no concept of ID in IPv6. */
		NAPI_GRO_CB(p)->flush_id = 0;
	}
	}


	NAPI_GRO_CB(skb)->flush |= flush;
	NAPI_GRO_CB(skb)->flush |= flush;