mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 18:36:00 +00:00
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>
This commit is contained in:
parent
9fda3510ab
commit
92a138e333
@ -377,7 +377,7 @@ static int smc_clnt_conf_first_link(struct smc_sock *smc)
|
|||||||
static void smc_conn_save_peer_info(struct smc_sock *smc,
|
static void smc_conn_save_peer_info(struct smc_sock *smc,
|
||||||
struct smc_clc_msg_accept_confirm *clc)
|
struct smc_clc_msg_accept_confirm *clc)
|
||||||
{
|
{
|
||||||
smc->conn.peer_conn_idx = clc->conn_idx;
|
smc->conn.peer_rmbe_idx = clc->rmbe_idx;
|
||||||
smc->conn.local_tx_ctrl.token = ntohl(clc->rmbe_alert_token);
|
smc->conn.local_tx_ctrl.token = ntohl(clc->rmbe_alert_token);
|
||||||
smc->conn.peer_rmbe_size = smc_uncompress_bufsize(clc->rmbe_size);
|
smc->conn.peer_rmbe_size = smc_uncompress_bufsize(clc->rmbe_size);
|
||||||
atomic_set(&smc->conn.peer_rmbe_space, smc->conn.peer_rmbe_size);
|
atomic_set(&smc->conn.peer_rmbe_space, smc->conn.peer_rmbe_size);
|
||||||
|
@ -118,7 +118,7 @@ struct smc_connection {
|
|||||||
struct rb_node alert_node;
|
struct rb_node alert_node;
|
||||||
struct smc_link_group *lgr; /* link group of connection */
|
struct smc_link_group *lgr; /* link group of connection */
|
||||||
u32 alert_token_local; /* unique conn. id */
|
u32 alert_token_local; /* unique conn. id */
|
||||||
u8 peer_conn_idx; /* from tcp handshake */
|
u8 peer_rmbe_idx; /* from tcp handshake */
|
||||||
int peer_rmbe_size; /* size of peer rx buffer */
|
int peer_rmbe_size; /* size of peer rx buffer */
|
||||||
atomic_t peer_rmbe_space;/* remaining free bytes in peer
|
atomic_t peer_rmbe_space;/* remaining free bytes in peer
|
||||||
* rmbe
|
* rmbe
|
||||||
|
@ -442,7 +442,7 @@ int smc_clc_send_confirm(struct smc_sock *smc)
|
|||||||
hton24(cclc.qpn, link->roce_qp->qp_num);
|
hton24(cclc.qpn, link->roce_qp->qp_num);
|
||||||
cclc.rmb_rkey =
|
cclc.rmb_rkey =
|
||||||
htonl(conn->rmb_desc->mr_rx[SMC_SINGLE_LINK]->rkey);
|
htonl(conn->rmb_desc->mr_rx[SMC_SINGLE_LINK]->rkey);
|
||||||
cclc.conn_idx = 1; /* for now: 1 RMB = 1 RMBE */
|
cclc.rmbe_idx = 1; /* for now: 1 RMB = 1 RMBE */
|
||||||
cclc.rmbe_alert_token = htonl(conn->alert_token_local);
|
cclc.rmbe_alert_token = htonl(conn->alert_token_local);
|
||||||
cclc.qp_mtu = min(link->path_mtu, link->peer_mtu);
|
cclc.qp_mtu = min(link->path_mtu, link->peer_mtu);
|
||||||
cclc.rmbe_size = conn->rmbe_size_short;
|
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)
|
|||||||
hton24(aclc.qpn, link->roce_qp->qp_num);
|
hton24(aclc.qpn, link->roce_qp->qp_num);
|
||||||
aclc.rmb_rkey =
|
aclc.rmb_rkey =
|
||||||
htonl(conn->rmb_desc->mr_rx[SMC_SINGLE_LINK]->rkey);
|
htonl(conn->rmb_desc->mr_rx[SMC_SINGLE_LINK]->rkey);
|
||||||
aclc.conn_idx = 1; /* as long as 1 RMB = 1 RMBE */
|
aclc.rmbe_idx = 1; /* as long as 1 RMB = 1 RMBE */
|
||||||
aclc.rmbe_alert_token = htonl(conn->alert_token_local);
|
aclc.rmbe_alert_token = htonl(conn->alert_token_local);
|
||||||
aclc.qp_mtu = link->path_mtu;
|
aclc.qp_mtu = link->path_mtu;
|
||||||
aclc.rmbe_size = conn->rmbe_size_short,
|
aclc.rmbe_size = conn->rmbe_size_short,
|
||||||
|
@ -97,7 +97,7 @@ struct smc_clc_msg_accept_confirm { /* clc accept / confirm message */
|
|||||||
struct smc_clc_msg_local lcl;
|
struct smc_clc_msg_local lcl;
|
||||||
u8 qpn[3]; /* QP number */
|
u8 qpn[3]; /* QP number */
|
||||||
__be32 rmb_rkey; /* RMB rkey */
|
__be32 rmb_rkey; /* RMB rkey */
|
||||||
u8 conn_idx; /* Connection index, which RMBE in RMB */
|
u8 rmbe_idx; /* Index of RMBE in RMB */
|
||||||
__be32 rmbe_alert_token;/* unique connection id */
|
__be32 rmbe_alert_token;/* unique connection id */
|
||||||
#if defined(__BIG_ENDIAN_BITFIELD)
|
#if defined(__BIG_ENDIAN_BITFIELD)
|
||||||
u8 rmbe_size : 4, /* RMBE buf size (compressed notation) */
|
u8 rmbe_size : 4, /* RMBE buf size (compressed notation) */
|
||||||
|
@ -261,7 +261,7 @@ static int smc_tx_rdma_write(struct smc_connection *conn, int peer_rmbe_offset,
|
|||||||
rdma_wr.remote_addr =
|
rdma_wr.remote_addr =
|
||||||
lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].dma_addr +
|
lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].dma_addr +
|
||||||
/* RMBE within RMB */
|
/* RMBE within RMB */
|
||||||
((conn->peer_conn_idx - 1) * conn->peer_rmbe_size) +
|
((conn->peer_rmbe_idx - 1) * conn->peer_rmbe_size) +
|
||||||
/* offset within RMBE */
|
/* offset within RMBE */
|
||||||
peer_rmbe_offset;
|
peer_rmbe_offset;
|
||||||
rdma_wr.rkey = lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].rkey;
|
rdma_wr.rkey = lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].rkey;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user