lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6053941.09g013ZNxx@stwm.de>
Date:	Tue, 20 Oct 2015 11:21:06 +0200
From:	Wolfgang Walter <linux@...m.de>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Jesse Gross <jesse@...ira.com>, Jerry Chu <hkchu@...gle.com>,
	Tom Herbert <tom@...bertland.com>,
	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>, kernel-team@...com,
	Herbert Xu <herbert@...dor.apana.org.au>
Subject: Re: [PATCH v2 net-next 3/4] ipv6: Add gro functions to sit_offloads

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@...bertland.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@...bertland.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@...dor.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@...m.de>
> >     Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
> >     Signed-off-by: David S. Miller <davem@...emloft.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ