netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Yasevich <vyasevich@gmail.com>
To: netdev@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org, mst@redhat.com,
	ben@decadent.org.uk, edumazet@google.com,
	Vladislav Yasevich <vyasevic@redhat.com>
Subject: [PATCH 2/3] Revert "drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO packets"
Date: Mon, 26 Jan 2015 09:37:05 -0500	[thread overview]
Message-ID: <1422283026-27832-3-git-send-email-vyasevic@redhat.com> (raw)
In-Reply-To: <1422283026-27832-1-git-send-email-vyasevic@redhat.com>

This reverts commit 5188cd44c55db3e92cd9e77a40b5baa7ed4340f7.

Now that GSO layer can track if fragment id has been selected
and can allocate on if necessary, we don't need to do this in
tap and macvtap.  This reverts most of the code and only keeps
the new ipv6 fragment id generation function that is still needed.

It also solves this issues for packet sockets which were
missed before.

Fixes: 3d0ad09412ff (drivers/net: Disable UFO through virtio)
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
 drivers/net/macvtap.c | 3 ---
 drivers/net/tun.c     | 6 +-----
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 7df2217..0b86e46 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -17,7 +17,6 @@
 #include <linux/fs.h>
 #include <linux/uio.h>
 
-#include <net/ipv6.h>
 #include <net/net_namespace.h>
 #include <net/rtnetlink.h>
 #include <net/sock.h>
@@ -589,8 +588,6 @@ static int macvtap_skb_from_vnet_hdr(struct macvtap_queue *q,
 			pr_warn_once("macvtap: %s: using disabled UFO feature; please fix this program\n",
 				     current->comm);
 			gso_type = SKB_GSO_UDP;
-			if (skb->protocol == htons(ETH_P_IPV6))
-				ipv6_proxy_select_ident(skb);
 			break;
 		default:
 			return -EINVAL;
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 8c8dc16..5ca42b7 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -65,7 +65,6 @@
 #include <linux/nsproxy.h>
 #include <linux/virtio_net.h>
 #include <linux/rcupdate.h>
-#include <net/ipv6.h>
 #include <net/net_namespace.h>
 #include <net/netns/generic.h>
 #include <net/rtnetlink.h>
@@ -1167,8 +1166,6 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 		break;
 	}
 
-	skb_reset_network_header(skb);
-
 	if (gso.gso_type != VIRTIO_NET_HDR_GSO_NONE) {
 		pr_debug("GSO!\n");
 		switch (gso.gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
@@ -1189,8 +1186,6 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 					    current->comm);
 			}
 			skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
-			if (skb->protocol == htons(ETH_P_IPV6))
-				ipv6_proxy_select_ident(skb);
 			break;
 		}
 		default:
@@ -1221,6 +1216,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 		skb_shinfo(skb)->tx_flags |= SKBTX_SHARED_FRAG;
 	}
 
+	skb_reset_network_header(skb);
 	skb_probe_transport_header(skb, 0);
 
 	rxhash = skb_get_hash(skb);
-- 
1.9.3

  parent reply	other threads:[~2015-01-26 14:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 14:37 [PATCH 0/3] Restore UFO support to virtio_net devices Vladislav Yasevich
2015-01-26 14:37 ` [PATCH 1/3] ipv6: Select fragment id during UFO/GSO segmentation if not set Vladislav Yasevich
2015-01-27  2:47   ` Ben Hutchings
2015-01-27  8:27     ` David Miller
2015-01-27  8:42     ` Michael S. Tsirkin
2015-01-27 13:47       ` Hannes Frederic Sowa
2015-01-27 14:26         ` Vlad Yasevich
2015-01-27 14:38           ` Eric Dumazet
2015-01-27 16:02           ` Hannes Frederic Sowa
2015-01-27 16:08             ` Michael S. Tsirkin
2015-01-28  8:25               ` Hannes Frederic Sowa
2015-01-28  9:46                 ` Michael S. Tsirkin
2015-01-28 10:34                   ` Hannes Frederic Sowa
2015-01-28 10:39                     ` Hannes Frederic Sowa
2015-01-28 13:43                     ` Michael S. Tsirkin
2015-01-28 14:17                       ` Hannes Frederic Sowa
2015-01-28 14:16                     ` Vlad Yasevich
2015-01-28 14:45                       ` Hannes Frederic Sowa
2015-01-28 15:27                         ` Vlad Yasevich
2015-01-28 15:49                           ` Michael S. Tsirkin
2015-01-28 16:00                     ` Michael S. Tsirkin
2015-01-28 16:15                       ` Hannes Frederic Sowa
2015-01-28 16:48                         ` Michael S. Tsirkin
2015-01-28 17:34                           ` Hannes Frederic Sowa
2015-01-28 17:24                   ` Ben Hutchings
2015-01-27 16:25             ` Vlad Yasevich
2015-01-26 14:37 ` Vladislav Yasevich [this message]
2015-01-26 14:37 ` [PATCH 3/3] Revert "drivers/net: Disable UFO through virtio" Vladislav Yasevich
2015-01-27  2:51   ` Ben Hutchings
2015-01-26 15:28 ` [PATCH 0/3] Restore UFO support to virtio_net devices Michael S. Tsirkin
2015-01-26 15:32   ` Michael S. Tsirkin

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=1422283026-27832-3-git-send-email-vyasevic@redhat.com \
    --to=vyasevich@gmail.com \
    --cc=ben@decadent.org.uk \
    --cc=edumazet@google.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=vyasevic@redhat.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).