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:	Thu, 10 Dec 2009 10:10:51 +0200 (EET)
From:	"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To:	Krishna Kumar <krkumar2@...ibm.com>
cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH 2/3] tcp: Remove unrequired operations in tcp_push()

On Wed, 9 Dec 2009, Krishna Kumar wrote:

> From: Krishna Kumar <krkumar2@...ibm.com>
> 
> Remove unrequired operations in tcp_push()
> 
> Signed-off-by: Krishna Kumar <krkumar2@...ibm.com>
> ---
>  net/ipv4/tcp.c |   15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff -ruNp org/net/ipv4/tcp.c new/net/ipv4/tcp.c
> --- org/net/ipv4/tcp.c	2009-12-04 18:16:10.000000000 +0530
> +++ new/net/ipv4/tcp.c	2009-12-09 10:01:35.000000000 +0530
> @@ -536,8 +536,7 @@ static inline void skb_entail(struct soc
>  		tp->nonagle &= ~TCP_NAGLE_PUSH;
>  }
>  
> -static inline void tcp_mark_urg(struct tcp_sock *tp, int flags,
> -				struct sk_buff *skb)
> +static inline void tcp_mark_urg(struct tcp_sock *tp, int flags)
>  {
>  	if (flags & MSG_OOB)
>  		tp->snd_up = tp->write_seq;
> @@ -546,13 +545,15 @@ static inline void tcp_mark_urg(struct t
>  static inline void tcp_push(struct sock *sk, int flags, int mss_now,
>  			    int nonagle)
>  {
> -	struct tcp_sock *tp = tcp_sk(sk);
> -
>  	if (tcp_send_head(sk)) {
> -		struct sk_buff *skb = tcp_write_queue_tail(sk);
> -		if (!(flags & MSG_MORE) || forced_push(tp))
> +		struct tcp_sock *tp = tcp_sk(sk);
> +
> +		if (!(flags & MSG_MORE) || forced_push(tp)) {
> +			struct sk_buff *skb = tcp_write_queue_tail(sk);
> +
>  			tcp_mark_push(tp, skb);

I suppose one could kill the temporary variable completely then?

> -		tcp_mark_urg(tp, flags, skb);
> +		}
> +		tcp_mark_urg(tp, flags);
>  		__tcp_push_pending_frames(sk, mss_now,
>  					  (flags & MSG_MORE) ? TCP_NAGLE_CORK : nonagle);
>  	}

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