aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevich@gmail.com>2015-02-03 16:36:16 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-04 02:06:43 -0500
commit72f6510745592c87f612f62ae4f16bb002934df4 (patch)
tree89efa6ba41b8b4732ec73f1f7a6a6a1625390584 /drivers
parent0508c07f5e0c94f38afd5434e8b2a55b84553077 (diff)
Revert "drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO packets"
This reverts commit 5188cd44c55db3e92cd9e77a40b5baa7ed4340f7. Now that GSO layer can track if fragment id has been selected and can allocate one 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. Fixes: 3d0ad09412ff (drivers/net: Disable UFO through virtio) Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/macvtap.c3
-rw-r--r--drivers/net/tun.c6
2 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 7df221788cd4..0b86e46c130b 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -17,7 +17,6 @@
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/uio.h> 18#include <linux/uio.h>
19 19
20#include <net/ipv6.h>
21#include <net/net_namespace.h> 20#include <net/net_namespace.h>
22#include <net/rtnetlink.h> 21#include <net/rtnetlink.h>
23#include <net/sock.h> 22#include <net/sock.h>
@@ -589,8 +588,6 @@ static int macvtap_skb_from_vnet_hdr(struct macvtap_queue *q,
589 pr_warn_once("macvtap: %s: using disabled UFO feature; please fix this program\n", 588 pr_warn_once("macvtap: %s: using disabled UFO feature; please fix this program\n",
590 current->comm); 589 current->comm);
591 gso_type = SKB_GSO_UDP; 590 gso_type = SKB_GSO_UDP;
592 if (skb->protocol == htons(ETH_P_IPV6))
593 ipv6_proxy_select_ident(skb);
594 break; 591 break;
595 default: 592 default:
596 return -EINVAL; 593 return -EINVAL;
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 8c8dc16839a7..5ca42b79b16f 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -65,7 +65,6 @@
65#include <linux/nsproxy.h> 65#include <linux/nsproxy.h>
66#include <linux/virtio_net.h> 66#include <linux/virtio_net.h>
67#include <linux/rcupdate.h> 67#include <linux/rcupdate.h>
68#include <net/ipv6.h>
69#include <net/net_namespace.h> 68#include <net/net_namespace.h>
70#include <net/netns/generic.h> 69#include <net/netns/generic.h>
71#include <net/rtnetlink.h> 70#include <net/rtnetlink.h>
@@ -1167,8 +1166,6 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
1167 break; 1166 break;
1168 } 1167 }
1169 1168
1170 skb_reset_network_header(skb);
1171
1172 if (gso.gso_type != VIRTIO_NET_HDR_GSO_NONE) { 1169 if (gso.gso_type != VIRTIO_NET_HDR_GSO_NONE) {
1173 pr_debug("GSO!\n"); 1170 pr_debug("GSO!\n");
1174 switch (gso.gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { 1171 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,
1189 current->comm); 1186 current->comm);
1190 } 1187 }
1191 skb_shinfo(skb)->gso_type = SKB_GSO_UDP; 1188 skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
1192 if (skb->protocol == htons(ETH_P_IPV6))
1193 ipv6_proxy_select_ident(skb);
1194 break; 1189 break;
1195 } 1190 }
1196 default: 1191 default:
@@ -1221,6 +1216,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
1221 skb_shinfo(skb)->tx_flags |= SKBTX_SHARED_FRAG; 1216 skb_shinfo(skb)->tx_flags |= SKBTX_SHARED_FRAG;
1222 } 1217 }
1223 1218
1219 skb_reset_network_header(skb);
1224 skb_probe_transport_header(skb, 0); 1220 skb_probe_transport_header(skb, 0);
1225 1221
1226 rxhash = skb_get_hash(skb); 1222 rxhash = skb_get_hash(skb);