netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <aduyck@mirantis.com>
To: ecree@solarflare.com, netdev@vger.kernel.org,
	davem@davemloft.net, alexander.duyck@gmail.com,
	tom@herbertland.com
Subject: [RFC PATCH 5/9] gue: Enforce IP ID verification on outer headers
Date: Fri, 18 Mar 2016 16:25:10 -0700	[thread overview]
Message-ID: <20160318232510.14955.18977.stgit@localhost.localdomain> (raw)
In-Reply-To: <20160318230945.14955.63211.stgit@localhost.localdomain>

This change enforces the IP ID verification on outer headers.  As a result
if the DF flag is not set on the outer header we will force the flow to be
flushed in the event that the IP ID is out of sequence with the existing
flow.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
 net/ipv4/fou.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c
index 780484243e14..2be35e4f6d88 100644
--- a/net/ipv4/fou.c
+++ b/net/ipv4/fou.c
@@ -341,6 +341,20 @@ static struct sk_buff **gue_gro_receive(struct sk_buff **head,
 			NAPI_GRO_CB(p)->same_flow = 0;
 			continue;
 		}
+
+		/* Include the IP ID check from the outer IP hdr */
+		if (!NAPI_GRO_CB(p)->flush_id)
+			continue;
+
+		/* If flush_id is non-zero and rfc6864 is enabled for
+		 * the new frame the only possibility is that we are
+		 * incrementing so we can xor by count to cancel out
+		 * the one acceptable value.
+		 */
+		NAPI_GRO_CB(p)->flush |= NAPI_GRO_CB(skb)->rfc6864 ?
+					 NAPI_GRO_CB(p)->flush_id ^
+					 NAPI_GRO_CB(p)->count :
+					 NAPI_GRO_CB(p)->flush_id;
 	}
 
 	rcu_read_lock();

  parent reply	other threads:[~2016-03-18 23:25 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 23:24 [RFC PATCH 0/9] RFC6864 compliant GRO and GSO partial offload Alexander Duyck
2016-03-18 23:24 ` [RFC PATCH 1/9] ipv4/GRO: Allow multiple frames to use the same IP ID Alexander Duyck
2016-03-24  1:43   ` Jesse Gross
2016-03-24  2:21     ` Alexander Duyck
2016-03-28  4:57       ` Jesse Gross
2016-03-18 23:24 ` [RFC PATCH 2/9] gre: Enforce IP ID verification on outer headers Alexander Duyck
2016-03-18 23:24 ` [RFC PATCH 3/9] geneve: " Alexander Duyck
2016-03-18 23:25 ` [RFC PATCH 4/9] vxlan: " Alexander Duyck
2016-03-18 23:25 ` Alexander Duyck [this message]
2016-03-18 23:25 ` [RFC PATCH 6/9] ethtool: Add support for toggling any of the GSO offloads Alexander Duyck
2016-03-19  0:18   ` Ben Hutchings
2016-03-19  0:30     ` Alexander Duyck
2016-03-19  1:42       ` Ben Hutchings
2016-03-19  2:01         ` Jesse Gross
2016-03-19  2:43           ` Alexander Duyck
2016-03-18 23:25 ` [RFC PATCH 7/9] GSO: Support partial segmentation offload Alexander Duyck
2016-03-22 17:00   ` Edward Cree
2016-03-22 17:47     ` Alexander Duyck
2016-03-22 19:40       ` Edward Cree
2016-03-22 20:11         ` Jesse Gross
2016-03-22 20:17           ` David Miller
2016-03-22 21:38         ` Alexander Duyck
2016-03-23 16:27           ` Edward Cree
2016-03-23 18:06             ` Alexander Duyck
2016-03-23 21:05               ` Edward Cree
2016-03-23 22:36                 ` Alexander Duyck
2016-03-23 23:00                   ` Edward Cree
2016-03-23 23:15                     ` Alexander Duyck
2016-03-24 17:12                       ` Edward Cree
2016-03-24 18:43                         ` Alexander Duyck
2016-03-24 20:17                           ` Edward Cree
2016-03-24 21:50                             ` Alexander Duyck
2016-03-24 23:00                               ` Edward Cree
2016-03-24 23:35                                 ` Alexander Duyck
2016-03-25  0:37                                   ` Edward Cree
2016-03-23 17:09   ` Tom Herbert
2016-03-23 18:19     ` Alexander Duyck
2016-03-24  1:37       ` Jesse Gross
2016-03-24  2:53         ` Alexander Duyck
2016-03-28  5:35           ` Jesse Gross
2016-03-28  5:36   ` Jesse Gross
2016-03-28 16:25     ` Alexander Duyck
2016-03-18 23:25 ` [RFC PATCH 8/9] i40e/i40evf: Add support for GSO partial with UDP_TUNNEL_CSUM and GRE_CSUM Alexander Duyck
2016-03-23 19:35   ` Jesse Gross
2016-03-23 20:21     ` Alexander Duyck
2016-03-18 23:25 ` [RFC PATCH 9/9] ixgbe/ixgbevf: Add support for GSO partial Alexander Duyck
2016-03-19  2:05   ` Jesse Gross
2016-03-19  2:42     ` Alexander Duyck
2016-03-21 18:50 ` [RFC PATCH 0/9] RFC6864 compliant GRO and GSO partial offload David Miller
2016-03-21 19:46   ` Alexander Duyck
2016-03-21 20:10     ` Jesse Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160318232510.14955.18977.stgit@localhost.localdomain \
    --to=aduyck@mirantis.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).