All of lore.kernel.org
 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, stefanha@redhat.com,
	Vladislav Yasevich <vyasevic@redhat.com>
Subject: [PATCH 02/10] net:  Correctly mark IPv6 UFO offload type.
Date: Wed, 17 Dec 2014 13:20:47 -0500	[thread overview]
Message-ID: <1418840455-22598-3-git-send-email-vyasevic@redhat.com> (raw)
In-Reply-To: <1418840455-22598-1-git-send-email-vyasevic@redhat.com>

If the device supports UFO6 features, mark the offloaded ipv6 udp
traffic appropriately.

Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
 net/ipv6/ip6_offload.c | 1 +
 net/ipv6/ip6_output.c  | 4 ++--
 net/ipv6/udp_offload.c | 3 ++-
 net/mpls/mpls_gso.c    | 1 +
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c
index 01e12d0..bd985d5 100644
--- a/net/ipv6/ip6_offload.c
+++ b/net/ipv6/ip6_offload.c
@@ -81,6 +81,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
 		       SKB_GSO_UDP_TUNNEL_CSUM |
 		       SKB_GSO_MPLS |
 		       SKB_GSO_TCPV6 |
+		       SKB_GSO_UDP6 |
 		       0)))
 		goto out;
 
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 8e950c2..83f5c04 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1089,7 +1089,7 @@ static inline int ip6_ufo_append_data(struct sock *sk,
 	 */
 	skb_shinfo(skb)->gso_size = (mtu - fragheaderlen -
 				     sizeof(struct frag_hdr)) & ~7;
-	skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
+	skb_shinfo(skb)->gso_type = SKB_GSO_UDP6;
 	ipv6_select_ident(&fhdr, rt);
 	skb_shinfo(skb)->ip6_frag_id = fhdr.identification;
 
@@ -1296,7 +1296,7 @@ emsgsize:
 	if (((length > mtu) ||
 	     (skb && skb_is_gso(skb))) &&
 	    (sk->sk_protocol == IPPROTO_UDP) &&
-	    (rt->dst.dev->features & NETIF_F_UFO)) {
+	    (rt->dst.dev->features & NETIF_F_UFO6)) {
 		err = ip6_ufo_append_data(sk, getfrag, from, length,
 					  hh_len, fragheaderlen,
 					  transhdrlen, mtu, flags, rt);
diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c
index 6b8f543..00d723e 100644
--- a/net/ipv6/udp_offload.c
+++ b/net/ipv6/udp_offload.c
@@ -39,6 +39,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
 		int type = skb_shinfo(skb)->gso_type;
 
 		if (unlikely(type & ~(SKB_GSO_UDP |
+				      SKB_GSO_UDP6 |
 				      SKB_GSO_DODGY |
 				      SKB_GSO_UDP_TUNNEL |
 				      SKB_GSO_UDP_TUNNEL_CSUM |
@@ -47,7 +48,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
 				      SKB_GSO_IPIP |
 				      SKB_GSO_SIT |
 				      SKB_GSO_MPLS) ||
-			     !(type & (SKB_GSO_UDP))))
+			     !(type & (SKB_GSO_UDP | SKB_GSO_UDP6))))
 			goto out;
 
 		skb_shinfo(skb)->gso_segs = DIV_ROUND_UP(skb->len, mss);
diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c
index e3545f2..27343f0 100644
--- a/net/mpls/mpls_gso.c
+++ b/net/mpls/mpls_gso.c
@@ -30,6 +30,7 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
 				~(SKB_GSO_TCPV4 |
 				  SKB_GSO_TCPV6 |
 				  SKB_GSO_UDP |
+				  SKB_GSO_UDP6 |
 				  SKB_GSO_DODGY |
 				  SKB_GSO_TCP_ECN |
 				  SKB_GSO_GRE |
-- 
1.9.3

  parent reply	other threads:[~2014-12-17 18:21 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17 18:20 [PATCH 00/10] Split UFO into v4 and v6 versions Vladislav Yasevich
2014-12-17 18:20 ` [PATCH 01/10] core: Split out UFO6 support Vladislav Yasevich
2014-12-17 18:20 ` Vladislav Yasevich
2014-12-17 20:10   ` Ben Hutchings
2014-12-17 20:43     ` Vlad Yasevich
2014-12-17 20:10   ` Ben Hutchings
2014-12-17 22:45   ` Michael S. Tsirkin
2014-12-17 23:31     ` Vlad Yasevich
2014-12-18  7:54       ` Michael S. Tsirkin
2014-12-18 15:01         ` Vlad Yasevich
2014-12-18 17:35           ` Michael S. Tsirkin
2014-12-18 17:50             ` Michael S. Tsirkin
2014-12-19 20:13               ` Vlad Yasevich
2014-12-20 21:03                 ` Michael S. Tsirkin
2014-12-22  4:06                   ` Vlad Yasevich
2014-12-19 19:55             ` Vlad Yasevich
2014-12-17 18:20 ` Vladislav Yasevich [this message]
2014-12-17 18:20 ` [PATCH 02/10] net: Correctly mark IPv6 UFO offload type Vladislav Yasevich
2014-12-17 18:20 ` [PATCH 03/10] ovs: Enable handling of UFO6 packets Vladislav Yasevich
2014-12-17 20:17   ` Sergei Shtylyov
2014-12-17 20:44     ` Vlad Yasevich
2014-12-17 22:26   ` Michael S. Tsirkin
2014-12-17 18:20 ` [PATCH 04/10] loopback: Turn on UFO6 support Vladislav Yasevich
2014-12-17 18:20 ` Vladislav Yasevich
2014-12-17 18:20 ` [PATCH 05/10] veth: Enable " Vladislav Yasevich
2014-12-17 18:20 ` Vladislav Yasevich
2014-12-17 18:20 ` [PATCH 06/10] macvlan: " Vladislav Yasevich
2014-12-17 18:20 ` Vladislav Yasevich
2014-12-17 18:20 ` [PATCH 07/10] s2io: " Vladislav Yasevich
2014-12-17 18:20 ` Vladislav Yasevich
2014-12-17 18:20 ` [PATCH 08/10] tun: Re-uanble UFO support Vladislav Yasevich
2014-12-17 18:20 ` Vladislav Yasevich
2014-12-17 22:33   ` Michael S. Tsirkin
2014-12-18  5:51   ` Jason Wang
2014-12-18 15:12     ` Vlad Yasevich
2014-12-19  4:37       ` Jason Wang
2014-12-17 18:20 ` [PATCH 09/10] macvtap: Re-enable " Vladislav Yasevich
2014-12-17 18:20 ` Vladislav Yasevich
2014-12-17 22:41   ` Michael S. Tsirkin
2014-12-18  2:43     ` Vlad Yasevich
2014-12-18  7:55       ` Michael S. Tsirkin
2014-12-18 15:15         ` Vlad Yasevich
2014-12-18 15:15         ` Vlad Yasevich
2014-12-17 18:20 ` [PATCH 10/10] Revert "drivers/net: Disable UFO through virtio" Vladislav Yasevich
2014-12-17 18:20 ` Vladislav Yasevich
2014-12-17 22:44   ` Michael S. Tsirkin
2014-12-18  5:28 ` [PATCH 00/10] Split UFO into v4 and v6 versions Jason Wang
2014-12-18  5:28 ` Jason Wang
2014-12-24 18:11   ` Ben Hutchings
2014-12-24 18:59     ` Michael S. Tsirkin
2014-12-25  3:02       ` Jason Wang
2014-12-25  7:14         ` Michael S. Tsirkin
2014-12-25  9:50           ` Jason Wang

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=1418840455-22598-3-git-send-email-vyasevic@redhat.com \
    --to=vyasevich@gmail.com \
    --cc=ben@decadent.org.uk \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=stefanha@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.