Lines Matching +full:wr +full:- +full:active
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Shared Memory Communications over RDMA (SMC-R) and RoCE
29 * also is the default value for SMC-R v1 and v2.0
32 * SMC-R v2.1 and later negotiation, vendors or
34 * 16-255 as needed.
52 SMC_LNK_ACTIVE, /* link is active */
95 struct smc_ib_device *smcibdev; /* ib-device */
96 u8 ibport; /* port - values 1 | 2 */
103 struct smc_wr_buf *wr_tx_bufs; /* WR send payload buffers */
104 struct ib_send_wr *wr_tx_ibs; /* WR send meta data */
105 struct ib_sge *wr_tx_sges; /* WR send gather meta data */
107 struct smc_rdma_wr *wr_tx_rdmas; /* WR RDMA WRITE */
108 struct smc_wr_tx_pend *wr_tx_pends; /* WR send waiting for CQE */
109 struct completion *wr_tx_compl; /* WR send CQE completion */
111 struct ib_send_wr *wr_tx_v2_ib; /* WR send v2 meta data */
112 struct ib_sge *wr_tx_v2_sge; /* WR send v2 gather meta data*/
113 struct smc_wr_tx_pend *wr_tx_v2_pend; /* WR send v2 waiting for CQE */
116 atomic_long_t wr_tx_id; /* seq # of last sent WR */
118 u32 wr_tx_cnt; /* number of WR send buffers */
119 wait_queue_head_t wr_tx_wait; /* wait for free WR send buf */
125 struct smc_wr_buf *wr_rx_bufs; /* WR recv payload buffers */
126 struct ib_recv_wr *wr_rx_ibs; /* WR recv meta data */
127 struct ib_sge *wr_rx_sges; /* WR recv scatter meta data */
131 u64 wr_rx_id; /* seq # of last recv WR */
132 u64 wr_rx_id_compl; /* seq # of last completed WR */
133 u32 wr_rx_cnt; /* number of WR recv buffers */
137 struct ib_reg_wr wr_reg; /* WR register memory region */
180 * default value for smc-r v1.0 and v2.0
183 * SMC-R v2.1 and later negotiation, vendors or
185 * 1-2 as needed.
196 struct { /* SMC-R */
219 struct { /* SMC-D */
245 SMC_LGR_NONE, /* no active links, lgr to be deleted */
246 SMC_LGR_SINGLE, /* 1 active RNIC on each peer */
247 SMC_LGR_SYMMETRIC, /* 2 active RNICs on each peer */
248 SMC_LGR_ASYMMETRIC_PEER, /* local has 2, peer 1 active RNICs */
249 SMC_LGR_ASYMMETRIC_LOCAL, /* local has 1, peer 2 active RNICs */
252 enum smcr_buf_type { /* types of SMC-R sndbufs and RMBs */
296 bool is_smcd; /* SMC-R or SMC-D */
303 struct { /* SMC-R */
309 /* WR v2 recv payload buffer */
311 /* WR v2 send payload buffer */
344 /* arrived when flow active */
361 struct { /* SMC-D */
400 /* max # of proposed non-native ISM devices,
401 * which can't exceed the max # of CHID-GID
402 * entries in CLC proposal SMC-Dv2 extension.
417 /* SMC-R */
428 /* SMC-D */
450 node = lgr->conns_all.rb_node; in smc_lgr_find_conn()
455 if (cur->alert_token_local > token) { in smc_lgr_find_conn()
456 node = node->rb_left; in smc_lgr_find_conn()
458 if (cur->alert_token_local < token) { in smc_lgr_find_conn()
459 node = node->rb_right; in smc_lgr_find_conn()
472 return conn->lgr && conn->alert_token_local; in smc_conn_lgr_valid()
484 if (lnk->state == SMC_LNK_UNUSED || lnk->state == SMC_LNK_INACTIVE) in smc_link_usable()
501 lnk->qp_attr.cur_qp_state == IB_QPS_RTS; in smc_link_sendable()
506 return lnk->state == SMC_LNK_ACTIVE; in smc_link_active()
533 smc_dev->pci_vendor = pci_dev->vendor; in smc_set_pci_values()
534 smc_dev->pci_device = pci_dev->device; in smc_set_pci_values()
535 snprintf(smc_dev->pci_id, sizeof(smc_dev->pci_id), "%s", in smc_set_pci_values()
542 smc_dev->pci_fid = zdev->fid; in smc_set_pci_values()
543 smc_dev->pci_pchid = zdev->pchid; in smc_set_pci_values()
605 return link->lgr; in smc_get_lgr()