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] [day] [month] [year] [list]
Date:	Wed, 23 Dec 2009 14:16:06 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	krkumar2@...ibm.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH 3/3 Ver2] tcp: Slightly optimize tcp_sendmsg

From: Krishna Kumar <krkumar2@...ibm.com>
Date: Thu, 10 Dec 2009 22:46:59 +0530

> From: Krishna Kumar <krkumar2@...ibm.com>
> 
> Slightly optimize tcp_sendmsg since NETIF_F_SG is used many
> times iteratively in the loop. The only other modification is
> to change:
> 			} else if (i == MAX_SKB_FRAGS ||
> 				   (!i &&
> 				   !(sk->sk_route_caps & NETIF_F_SG))) {
> 	to:
> 			} else if (i == MAX_SKB_FRAGS || !sg) {
> 
> The reason why this change is correct: this code (other than
> the MAX_SKB_FRAGS case) executes only due to the else part
> of: "if (skb_tailroom(skb) > 0) {" - i.e. there was no space
> in the skb to put the data inline. Hence SG is false is a
> sufficient condition, and there is no way a fragment can be
> added to the skb.
> 
> Changelog:
> 	- Added the above explanation for the change
> 
> Signed-off-by: Krishna Kumar <krkumar2@...ibm.com>
> Acked-by: Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>

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