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

Commit 803f8d29 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

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

parents f8403105 4fb81afa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5354,6 +5354,7 @@ static struct list_head *gro_list_prepare(struct napi_struct *napi,
		unsigned long diffs;

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

		if (hash != skb_get_hash_raw(p)) {
			NAPI_GRO_CB(p)->same_flow = 0;
+16 −7
Original line number Diff line number Diff line
@@ -1473,14 +1473,23 @@ struct sk_buff *inet_gro_receive(struct list_head *head, struct sk_buff *skb)
			(iph->tos ^ iph2->tos) |
			((iph->frag_off ^ iph2->frag_off) & htons(IP_DF));

		/* 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.
		 * This is because some GSO/TSO implementations do not
		 * correctly increment the IP ID for the outer hdrs.
		 */
		NAPI_GRO_CB(p)->flush_id =
			((u16)(ntohs(iph2->id) + NAPI_GRO_CB(p)->count) ^ id);
		NAPI_GRO_CB(p)->flush |= flush;

		/* For non-atomic datagrams we need to save the IP ID offset
		 * to be included later.  If the frame has the DF bit set
		 * we must ignore the IP ID value as per RFC 6864.
		 */
		if (iph2->frag_off & htons(IP_DF))
			continue;

		/* We must save the offset as it is possible to have multiple
		 * flows using the same protocol and address pairs so we
		 * 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.
		 */
		NAPI_GRO_CB(p)->flush_id |= ntohs(iph2->id) ^
					    (u16)(id - NAPI_GRO_CB(p)->count);
	}

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