Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <hwippel@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Hans Wippel and committed by
David S. Miller
92a138e3 9fda3510

+6 -6
+1 -1
net/smc/af_smc.c
··· 377 377 static void smc_conn_save_peer_info(struct smc_sock *smc, 378 378 struct smc_clc_msg_accept_confirm *clc) 379 379 { 380 - smc->conn.peer_conn_idx = clc->conn_idx; 380 + smc->conn.peer_rmbe_idx = clc->rmbe_idx; 381 381 smc->conn.local_tx_ctrl.token = ntohl(clc->rmbe_alert_token); 382 382 smc->conn.peer_rmbe_size = smc_uncompress_bufsize(clc->rmbe_size); 383 383 atomic_set(&smc->conn.peer_rmbe_space, smc->conn.peer_rmbe_size);
+1 -1
net/smc/smc.h
··· 118 118 struct rb_node alert_node; 119 119 struct smc_link_group *lgr; /* link group of connection */ 120 120 u32 alert_token_local; /* unique conn. id */ 121 - u8 peer_conn_idx; /* from tcp handshake */ 121 + u8 peer_rmbe_idx; /* from tcp handshake */ 122 122 int peer_rmbe_size; /* size of peer rx buffer */ 123 123 atomic_t peer_rmbe_space;/* remaining free bytes in peer 124 124 * rmbe
+2 -2
net/smc/smc_clc.c
··· 442 442 hton24(cclc.qpn, link->roce_qp->qp_num); 443 443 cclc.rmb_rkey = 444 444 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 */ 446 446 cclc.rmbe_alert_token = htonl(conn->alert_token_local); 447 447 cclc.qp_mtu = min(link->path_mtu, link->peer_mtu); 448 448 cclc.rmbe_size = conn->rmbe_size_short; ··· 494 494 hton24(aclc.qpn, link->roce_qp->qp_num); 495 495 aclc.rmb_rkey = 496 496 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 */ 498 498 aclc.rmbe_alert_token = htonl(conn->alert_token_local); 499 499 aclc.qp_mtu = link->path_mtu; 500 500 aclc.rmbe_size = conn->rmbe_size_short,
+1 -1
net/smc/smc_clc.h
··· 97 97 struct smc_clc_msg_local lcl; 98 98 u8 qpn[3]; /* QP number */ 99 99 __be32 rmb_rkey; /* RMB rkey */ 100 - u8 conn_idx; /* Connection index, which RMBE in RMB */ 100 + u8 rmbe_idx; /* Index of RMBE in RMB */ 101 101 __be32 rmbe_alert_token;/* unique connection id */ 102 102 #if defined(__BIG_ENDIAN_BITFIELD) 103 103 u8 rmbe_size : 4, /* RMBE buf size (compressed notation) */
+1 -1
net/smc/smc_tx.c
··· 261 261 rdma_wr.remote_addr = 262 262 lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].dma_addr + 263 263 /* RMBE within RMB */ 264 - ((conn->peer_conn_idx - 1) * conn->peer_rmbe_size) + 264 + ((conn->peer_rmbe_idx - 1) * conn->peer_rmbe_size) + 265 265 /* offset within RMBE */ 266 266 peer_rmbe_offset; 267 267 rdma_wr.rkey = lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].rkey;