On Thu, 2015-08-06 at 17:15 -0700, Jesse Gross wrote:
> On Mon, Aug 3, 2015 at 10:11 AM, Tom Herbert <t...@herbertland.com> wrote:
> > For GRO to work with sit we need gro_receive and gro_complete populated
> > in the sit_offload structure.
> >
> > Signed-off-by: Tom Herbert <t...@herbertland.com>
> 
> You might want to checkout the recent history on this file unless
> there's something that's changed in the last couple of weeks:
> 
> commit fdbf5b097bbd9693a86c0b8bfdd071a9a2117cfc
> Author: Herbert Xu <herb...@gondor.apana.org.au>
> Date:   Mon Jul 20 17:55:38 2015 +0800
> 
>     Revert "sit: Add gro callbacks to sit_offload"
> 
>     This patch reverts 19424e052fb44da2f00d1a868cbb51f3e9f4bbb5 ("sit:
>     Add gro callbacks to sit_offload") because it generates packets
>     that cannot be handled even by our own GSO.
> 
>     Reported-by: Wolfgang Walter <li...@stwm.de>
>     Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au>
>     Signed-off-by: David S. Miller <da...@davemloft.net>
> --


What about the following more complete patch ?

We properly set skb->encapsulation and inner network header as some NIC
drivers depend on it. Our GSO should also work properly I think.

Wolfgang, could you please test it ? (this is a patch on top of David
Miller net-next tree)

Both Google and Facebook are eager to get proper GRO/SIT support ;)

Thanks !

diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c
index 08b62047c67f..eeca943f12dc 100644
--- a/net/ipv6/ip6_offload.c
+++ b/net/ipv6/ip6_offload.c
@@ -264,6 +264,9 @@ static int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
        struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + nhoff);
        int err = -ENOSYS;
 
+       if (skb->encapsulation)
+               skb_set_inner_network_header(skb, nhoff);
+
        iph->payload_len = htons(skb->len - nhoff - sizeof(*iph));
 
        rcu_read_lock();
@@ -280,6 +283,13 @@ out_unlock:
        return err;
 }
 
+static int sit_gro_complete(struct sk_buff *skb, int nhoff)
+{
+       skb->encapsulation = 1;
+       skb_shinfo(skb)->gso_type |= SKB_GSO_SIT;
+       return ipv6_gro_complete(skb, nhoff);
+}
+
 static struct packet_offload ipv6_packet_offload __read_mostly = {
        .type = cpu_to_be16(ETH_P_IPV6),
        .callbacks = {
@@ -292,6 +302,8 @@ static struct packet_offload ipv6_packet_offload 
__read_mostly = {
 static const struct net_offload sit_offload = {
        .callbacks = {
                .gso_segment    = ipv6_gso_segment,
+               .gro_receive    = ipv6_gro_receive,
+               .gro_complete   = sit_gro_complete,
        },
 };
 


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to