[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1508170407.31614.78.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Mon, 16 Oct 2017 09:13:27 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Ursula Braun <ubraun@...ux.vnet.ibm.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-s390@...r.kernel.org, jwi@...ux.vnet.ibm.com,
schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
raspl@...ux.vnet.ibm.com
Subject: Re: [PATCH net-next 1/2] tcp: TCP experimental option for SMC
On Mon, 2017-10-16 at 17:42 +0200, Ursula Braun wrote:
...
> +static void smc_set_capability(struct inet_request_sock *ireq,
> + const struct tcp_options_received *rx_opt)
> +{
> +#if IS_ENABLED(CONFIG_SMC)
> + if (!static_key_false(&tcp_have_smc))
> + return;
> +
> + if (rx_opt->smc_ok)
> + ireq->smc_ok = 1;
> + else
> + ireq->smc_ok = 0;
> +#endif
> +}
I do not think this static_key_false(&tcp_have_smc)) makes sense here.
1) If you have a SYN packet while the key is not set
2) Then tcp_have_smc is changed
3) ACK packets comes, and finds random value in ireq->smc_ok
So really here you have to set this field.
static void smc_set_capability(struct inet_request_sock *ireq,
const struct tcp_options_received *rx_opt)
{
#if IS_ENABLED(CONFIG_SMC)
ireq->smc_ok = rx_opt->smc_ok;
#endif
}
Powered by blists - more mailing lists