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]
Date:	Wed, 11 Dec 2013 11:37:18 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	"H.K. Jerry Chu" <hkchu@...gle.com>
Cc:	edumazet@...gle.com, herbert@...dor.apana.org.au,
	ogerlitz@...lanox.com, bhutchings@...arflare.com,
	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next] net-gro: Prepare GRO stack for the upcoming
 tunneling support

On Wed, 2013-12-11 at 11:04 -0800, H.K. Jerry Chu wrote:

> -int tcp_gro_complete(struct sk_buff *skb)
> +int __tcp_gro_complete(struct sk_buff *skb, struct tcphdr *th)
>  {
> -	struct tcphdr *th = tcp_hdr(skb);
> -
> -	skb->csum_start = skb_transport_header(skb) - skb->head;
> +	skb->csum_start = (unsigned char *)th - skb->head;
>  	skb->csum_offset = offsetof(struct tcphdr, check);
>  	skb->ip_summed = CHECKSUM_PARTIAL;
>  
> @@ -251,6 +250,12 @@ int tcp_gro_complete(struct sk_buff *skb)
>  
>  	return 0;
>  }
> +EXPORT_SYMBOL(__tcp_gro_complete);
> +
> +int tcp_gro_complete(struct sk_buff *skb)
> +{
> +	return __tcp_gro_complete(skb,  tcp_hdr(skb));
> +}


I have no idea why you kept this change.

As we said, the transport offset is set, so it looks like a lot of your
changes can be removed to ease the review

tcp_gro_receive() sets the transport header, so the xxx_complete()
handlers can rely on it.

The only part that you could keep is the following optim :

- skb->csum_start = skb_transport_header(skb) - skb->head;
+ skb->csum_start = (unsigned char *)th - skb->head;



--
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