public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Wolfgang Walter <linux@stwm•de>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: Jesse Gross <jesse@nicira•com>, Jerry Chu <hkchu@google•com>,
	Tom Herbert <tom@herbertland•com>,
	David Miller <davem@davemloft•net>,
	netdev <netdev@vger•kernel.org>,
	kernel-team@fb•com, Herbert Xu <herbert@gondor•apana.org.au>
Subject: Re: [PATCH v2 net-next 3/4] ipv6: Add gro functions to sit_offloads
Date: Tue, 20 Oct 2015 11:21:06 +0200	[thread overview]
Message-ID: <6053941.09g013ZNxx@stwm.de> (raw)
In-Reply-To: <1445009029.25595.16.camel@edumazet-glaptop2.roam.corp.google.com>

Hello Eric!

Am Freitag, 16. Oktober 2015, 08:23:49 schrieb Eric Dumazet:
> On Thu, 2015-08-06 at 17:15 -0700, Jesse Gross wrote:
> > On Mon, Aug 3, 2015 at 10:11 AM, Tom Herbert <tom@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 <tom@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 <herbert@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 <linux@stwm•de>
> >     Signed-off-by: Herbert Xu <herbert@gondor•apana.org.au>
> >     Signed-off-by: David S. Miller <davem@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 !

In the moment I can't test it, sorry.

Will test it next week. But as I see you already did that yourself.

> 
> 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,
>  	},
>  };

Thank you very much,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts

  parent reply	other threads:[~2015-10-20  9:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 17:11 [PATCH v2 net-next 0/4] gro: Fixes for tunnels and GRO Tom Herbert
2015-08-03 17:11 ` [PATCH v2 net-next 1/4] gro: Fix remcsum offload to deal with frags in GRO Tom Herbert
2015-08-03 17:11 ` [PATCH v2 net-next 2/4] vxlan: GRO support at tunnel layer Tom Herbert
2015-08-03 17:11 ` [PATCH v2 net-next 3/4] ipv6: Add gro functions to sit_offloads Tom Herbert
2015-08-07  0:15   ` Jesse Gross
2015-10-16 15:23     ` Eric Dumazet
2015-10-20  2:04       ` Eric Dumazet
2015-10-20  3:40         ` [PATCH net-next] ipv6: gro: support sit protocol Eric Dumazet
2015-10-20  3:51           ` Tom Herbert
2015-10-22  2:37           ` David Miller
2015-11-03 12:57           ` Wolfgang Walter
2015-11-03 13:07             ` Eric Dumazet
2015-11-03 21:14               ` Tom Herbert
2015-11-04 12:19               ` Wolfgang Walter
2015-11-04 12:40                 ` Eric Dumazet
2015-11-04 14:09                   ` Wolfgang Walter
2015-11-04 15:13                     ` Eric Dumazet
2015-11-04 17:05                       ` Wolfgang Walter
2015-10-20  9:21       ` Wolfgang Walter [this message]
2015-08-03 17:11 ` [PATCH v2 net-next 4/4] fou: Do WARN_ON_ONCE in gue_gro_receive for bad proto callbacks Tom Herbert
2015-08-07  1:55 ` [PATCH v2 net-next 0/4] gro: Fixes for tunnels and GRO David Miller

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=6053941.09g013ZNxx@stwm.de \
    --to=linux@stwm$(echo .)de \
    --cc=davem@davemloft$(echo .)net \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=herbert@gondor$(echo .)apana.org.au \
    --cc=hkchu@google$(echo .)com \
    --cc=jesse@nicira$(echo .)com \
    --cc=kernel-team@fb$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=tom@herbertland$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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