diff options
author | Karsten Graul <kgraul@linux.ibm.com> | 2018-05-02 16:56:44 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-02 13:29:12 -0400 |
commit | 877ae5be421de3173b1306113c3f88003ae798b3 (patch) | |
tree | c223eeb664b494475bbd1671c14ce060a5fffded /net/smc/af_smc.c | |
parent | e90c1a1090cccf833080b512746f24667985ed73 (diff) | |
download | lwn-877ae5be421de3173b1306113c3f88003ae798b3.tar.gz lwn-877ae5be421de3173b1306113c3f88003ae798b3.zip |
net/smc: periodic testlink support
Add periodic LLC testlink support to ensure the link is still active.
The interval time is initialized using the value of
sysctl_tcp_keepalive_time.
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/af_smc.c')
-rw-r--r-- | net/smc/af_smc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 20aa4175b9f8..961b8eff9553 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -294,6 +294,7 @@ static void smc_copy_sock_settings_to_smc(struct smc_sock *smc) static int smc_clnt_conf_first_link(struct smc_sock *smc) { + struct net *net = sock_net(smc->clcsock->sk); struct smc_link_group *lgr = smc->conn.lgr; struct smc_link *link; int rest; @@ -353,7 +354,7 @@ static int smc_clnt_conf_first_link(struct smc_sock *smc) if (rc < 0) return SMC_CLC_DECL_TCL; - link->state = SMC_LNK_ACTIVE; + smc_llc_link_active(link, net->ipv4.sysctl_tcp_keepalive_time); return 0; } @@ -715,6 +716,7 @@ void smc_close_non_accepted(struct sock *sk) static int smc_serv_conf_first_link(struct smc_sock *smc) { + struct net *net = sock_net(smc->clcsock->sk); struct smc_link_group *lgr = smc->conn.lgr; struct smc_link *link; int rest; @@ -769,7 +771,7 @@ static int smc_serv_conf_first_link(struct smc_sock *smc) return rc; } - link->state = SMC_LNK_ACTIVE; + smc_llc_link_active(link, net->ipv4.sysctl_tcp_keepalive_time); return 0; } |