Lines Matching defs:link
22 #define SMC_WR_BUF_CNT 16 /* # of ctrl buffers per link */
52 static inline long smc_wr_tx_get_next_wr_id(struct smc_link *link)
54 return atomic_long_inc_return(&link->wr_tx_id);
62 static inline bool smc_wr_tx_link_hold(struct smc_link *link)
64 if (!smc_link_sendable(link))
66 percpu_ref_get(&link->wr_tx_refs);
70 static inline void smc_wr_tx_link_put(struct smc_link *link)
72 percpu_ref_put(&link->wr_tx_refs);
91 static inline int smc_wr_rx_post(struct smc_link *link)
97 wr_id = ++link->wr_rx_id; /* tasklet context, thus not atomic */
99 index = do_div(temp_wr_id, link->wr_rx_cnt);
100 link->wr_rx_ibs[index].wr_id = wr_id;
101 rc = ib_post_recv(link->roce_qp, &link->wr_rx_ibs[index], NULL);
115 int smc_wr_tx_get_free_slot(struct smc_link *link, smc_wr_tx_handler handler,
119 int smc_wr_tx_get_v2_slot(struct smc_link *link,
123 int smc_wr_tx_put_slot(struct smc_link *link,
125 int smc_wr_tx_send(struct smc_link *link,
127 int smc_wr_tx_v2_send(struct smc_link *link,
129 int smc_wr_tx_send_wait(struct smc_link *link, struct smc_wr_tx_pend_priv *priv,
132 void smc_wr_tx_wait_no_pending_sends(struct smc_link *link);
135 int smc_wr_rx_post_init(struct smc_link *link);
137 int smc_wr_reg_send(struct smc_link *link, struct ib_mr *mr);