diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2020-09-10 18:48:21 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-10 15:24:26 -0700 |
commit | 5ac54d8768da973d761fef8aa1be9f00001107c0 (patch) | |
tree | 3496127b44ef78f0fc1b3b5919018ef5e67910cf /net/smc/smc_clc.c | |
parent | a60a2b1e0af1a7517ba41689b39e9df90ef09041 (diff) | |
download | linux-5ac54d8768da973d761fef8aa1be9f00001107c0.tar.gz linux-5ac54d8768da973d761fef8aa1be9f00001107c0.tar.bz2 linux-5ac54d8768da973d761fef8aa1be9f00001107c0.zip |
net/smc: introduce better field names
Field names "srv_first_contact" and "cln_first_contact" are misleading,
since they apply to both, server and client. Rename them to
"first_contact_peer" and "first_contact_local".
Rename "ism_gid" by the more precise name "ism_peer_gid".
Rename version constant "SMC_CLC_V1" into "SMC_V1".
No functional change.
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_clc.c')
-rw-r--r-- | net/smc/smc_clc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index 779f4142a11d..c30fad120089 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c @@ -320,7 +320,7 @@ int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen, } datlen = ntohs(clcm->length); if ((len < sizeof(struct smc_clc_msg_hdr)) || - (clcm->version < SMC_CLC_V1) || + (clcm->version < SMC_V1) || ((clcm->type != SMC_CLC_DECLINE) && (clcm->type != expected_type))) { smc->sk.sk_err = EPROTO; @@ -389,7 +389,7 @@ int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info) memcpy(dclc.hdr.eyecatcher, SMC_EYECATCHER, sizeof(SMC_EYECATCHER)); dclc.hdr.type = SMC_CLC_DECLINE; dclc.hdr.length = htons(sizeof(struct smc_clc_msg_decline)); - dclc.hdr.version = SMC_CLC_V1; + dclc.hdr.version = SMC_V1; dclc.hdr.flag = (peer_diag_info == SMC_CLC_DECL_SYNCERR) ? 1 : 0; if ((!smc->conn.lgr || !smc->conn.lgr->is_smcd) && smc_ib_is_valid_local_systemid()) @@ -434,7 +434,7 @@ int smc_clc_send_proposal(struct smc_sock *smc, int smc_type, memset(&pclc, 0, sizeof(pclc)); memcpy(pclc.hdr.eyecatcher, SMC_EYECATCHER, sizeof(SMC_EYECATCHER)); pclc.hdr.type = SMC_CLC_PROPOSAL; - pclc.hdr.version = SMC_CLC_V1; /* SMC version */ + pclc.hdr.version = SMC_V1; /* SMC version */ pclc.hdr.path = smc_type; if (smc_type == SMC_TYPE_R || smc_type == SMC_TYPE_B) { /* add SMC-R specifics */ @@ -499,8 +499,8 @@ int smc_clc_send_confirm(struct smc_sock *smc) /* send SMC Confirm CLC msg */ memset(&cclc, 0, sizeof(cclc)); cclc.hdr.type = SMC_CLC_CONFIRM; - cclc.hdr.version = SMC_CLC_V1; /* SMC version */ - if (smc->conn.lgr->is_smcd) { + cclc.hdr.version = SMC_V1; /* SMC version */ + if (conn->lgr->is_smcd) { /* SMC-D specific settings */ memcpy(cclc.hdr.eyecatcher, SMCD_EYECATCHER, sizeof(SMCD_EYECATCHER)); @@ -557,7 +557,7 @@ int smc_clc_send_confirm(struct smc_sock *smc) } /* send CLC ACCEPT message across internal TCP socket */ -int smc_clc_send_accept(struct smc_sock *new_smc, int srv_first_contact) +int smc_clc_send_accept(struct smc_sock *new_smc, bool srv_first_contact) { struct smc_connection *conn = &new_smc->conn; struct smc_clc_msg_accept_confirm aclc; @@ -568,11 +568,11 @@ int smc_clc_send_accept(struct smc_sock *new_smc, int srv_first_contact) memset(&aclc, 0, sizeof(aclc)); aclc.hdr.type = SMC_CLC_ACCEPT; - aclc.hdr.version = SMC_CLC_V1; /* SMC version */ + aclc.hdr.version = SMC_V1; /* SMC version */ if (srv_first_contact) aclc.hdr.flag = 1; - if (new_smc->conn.lgr->is_smcd) { + if (conn->lgr->is_smcd) { /* SMC-D specific settings */ aclc.hdr.length = htons(SMCD_CLC_ACCEPT_CONFIRM_LEN); memcpy(aclc.hdr.eyecatcher, SMCD_EYECATCHER, |