public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] tcp: bool conversions
Date: Thu, 17 May 2012 13:46:36 +0100	[thread overview]
Message-ID: <1337258796.2496.6.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <1337246134.4740.5.camel@edumazet-laptop>

On Thu, 2012-05-17 at 11:15 +0200, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> bool conversions where possible.

There's a bit more than bool conversions here:

[...]
> --- a/net/ipv4/tcp_hybla.c
> +++ b/net/ipv4/tcp_hybla.c
[...]
> @@ -24,8 +24,7 @@ struct hybla {
>  	u32   minrtt;	      /* Minimum smoothed round trip time value seen */
>  };
>  
> -/* Hybla reference round trip time (default= 1/40 sec = 25 ms),
> -   expressed in jiffies */
> +/* Hybla reference round trip time (default= 1/40 sec = 25 ms), in ms */
>  static int rtt0 = 25;
>  module_param(rtt0, int, 0644);
>  MODULE_PARM_DESC(rtt0, "reference rout trip time (ms)");
> @@ -39,7 +38,7 @@ static inline void hybla_recalc_param (struct sock *sk)
>  	ca->rho_3ls = max_t(u32, tcp_sk(sk)->srtt / msecs_to_jiffies(rtt0), 8);
>  	ca->rho = ca->rho_3ls >> 3;
>  	ca->rho2_7ls = (ca->rho_3ls * ca->rho_3ls) << 1;
> -	ca->rho2 = ca->rho2_7ls >>7;
> +	ca->rho2 = ca->rho2_7ls >> 7;
>  }
>  
>  static void hybla_init(struct sock *sk)
[...] 
> @@ -67,6 +66,7 @@ static void hybla_init(struct sock *sk)
>  static void hybla_state(struct sock *sk, u8 ca_state)
>  {
>  	struct hybla *ca = inet_csk_ca(sk);
> +
>  	ca->hybla_en = (ca_state == TCP_CA_Open);
>  }
>  
[...]
> --- a/net/ipv4/tcp_minisocks.c
> +++ b/net/ipv4/tcp_minisocks.c
[...]
> -static __inline__ int tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win)
> +static bool tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win)
>  { 
[...]
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
[...]
>  /* Does at least the first segment of SKB fit into the send window? */
> -static inline int tcp_snd_wnd_test(const struct tcp_sock *tp, const struct sk_buff *skb,
> -				   unsigned int cur_mss)
> +static bool tcp_snd_wnd_test(const struct tcp_sock *tp,
> +			     const struct sk_buff *skb,
> +			     unsigned int cur_mss)
[...]

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  reply	other threads:[~2012-05-17 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17  9:15 [PATCH net-next] tcp: bool conversions Eric Dumazet
2012-05-17 12:46 ` Ben Hutchings [this message]
2012-05-17 15:46   ` Eric Dumazet
2012-05-17 19:03 ` 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=1337258796.2496.6.camel@bwh-desktop.uk.solarflarecom.com \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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