Skip to content

Commit 92a138e

Browse files
Hans Wippeldavem330
authored andcommitted
net/smc: rename connection index to RMBE index
The connection index is actually a RMBE index. So, this patch changes the name accordingly. Signed-off-by: Hans Wippel <[email protected]> Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9fda351 commit 92a138e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

net/smc/af_smc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ static int smc_clnt_conf_first_link(struct smc_sock *smc)
377377
static void smc_conn_save_peer_info(struct smc_sock *smc,
378378
struct smc_clc_msg_accept_confirm *clc)
379379
{
380-
smc->conn.peer_conn_idx = clc->conn_idx;
380+
smc->conn.peer_rmbe_idx = clc->rmbe_idx;
381381
smc->conn.local_tx_ctrl.token = ntohl(clc->rmbe_alert_token);
382382
smc->conn.peer_rmbe_size = smc_uncompress_bufsize(clc->rmbe_size);
383383
atomic_set(&smc->conn.peer_rmbe_space, smc->conn.peer_rmbe_size);

net/smc/smc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ struct smc_connection {
118118
struct rb_node alert_node;
119119
struct smc_link_group *lgr; /* link group of connection */
120120
u32 alert_token_local; /* unique conn. id */
121-
u8 peer_conn_idx; /* from tcp handshake */
121+
u8 peer_rmbe_idx; /* from tcp handshake */
122122
int peer_rmbe_size; /* size of peer rx buffer */
123123
atomic_t peer_rmbe_space;/* remaining free bytes in peer
124124
* rmbe

net/smc/smc_clc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ int smc_clc_send_confirm(struct smc_sock *smc)
442442
hton24(cclc.qpn, link->roce_qp->qp_num);
443443
cclc.rmb_rkey =
444444
htonl(conn->rmb_desc->mr_rx[SMC_SINGLE_LINK]->rkey);
445-
cclc.conn_idx = 1; /* for now: 1 RMB = 1 RMBE */
445+
cclc.rmbe_idx = 1; /* for now: 1 RMB = 1 RMBE */
446446
cclc.rmbe_alert_token = htonl(conn->alert_token_local);
447447
cclc.qp_mtu = min(link->path_mtu, link->peer_mtu);
448448
cclc.rmbe_size = conn->rmbe_size_short;
@@ -494,7 +494,7 @@ int smc_clc_send_accept(struct smc_sock *new_smc, int srv_first_contact)
494494
hton24(aclc.qpn, link->roce_qp->qp_num);
495495
aclc.rmb_rkey =
496496
htonl(conn->rmb_desc->mr_rx[SMC_SINGLE_LINK]->rkey);
497-
aclc.conn_idx = 1; /* as long as 1 RMB = 1 RMBE */
497+
aclc.rmbe_idx = 1; /* as long as 1 RMB = 1 RMBE */
498498
aclc.rmbe_alert_token = htonl(conn->alert_token_local);
499499
aclc.qp_mtu = link->path_mtu;
500500
aclc.rmbe_size = conn->rmbe_size_short,

net/smc/smc_clc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct smc_clc_msg_accept_confirm { /* clc accept / confirm message */
9797
struct smc_clc_msg_local lcl;
9898
u8 qpn[3]; /* QP number */
9999
__be32 rmb_rkey; /* RMB rkey */
100-
u8 conn_idx; /* Connection index, which RMBE in RMB */
100+
u8 rmbe_idx; /* Index of RMBE in RMB */
101101
__be32 rmbe_alert_token;/* unique connection id */
102102
#if defined(__BIG_ENDIAN_BITFIELD)
103103
u8 rmbe_size : 4, /* RMBE buf size (compressed notation) */

net/smc/smc_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static int smc_tx_rdma_write(struct smc_connection *conn, int peer_rmbe_offset,
261261
rdma_wr.remote_addr =
262262
lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].dma_addr +
263263
/* RMBE within RMB */
264-
((conn->peer_conn_idx - 1) * conn->peer_rmbe_size) +
264+
((conn->peer_rmbe_idx - 1) * conn->peer_rmbe_size) +
265265
/* offset within RMBE */
266266
peer_rmbe_offset;
267267
rdma_wr.rkey = lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].rkey;

0 commit comments

Comments
 (0)