Lines Matching defs:flow
164 struct smc_llc_qentry *smc_llc_flow_qentry_clr(struct smc_llc_flow *flow)
166 struct smc_llc_qentry *qentry = flow->qentry;
168 flow->qentry = NULL;
172 void smc_llc_flow_qentry_del(struct smc_llc_flow *flow)
176 if (flow->qentry) {
177 qentry = flow->qentry;
178 flow->qentry = NULL;
183 static inline void smc_llc_flow_qentry_set(struct smc_llc_flow *flow,
186 flow->qentry = qentry;
202 "LLC msg: msg %d flow %d role %d\n",
209 /* try to start a new llc flow, initiated by an incoming llc msg */
210 static bool smc_llc_flow_start(struct smc_llc_flow *flow,
216 if (flow->type) {
217 /* a flow is already active */
218 smc_llc_flow_parallel(lgr, flow->type, qentry);
224 flow->type = SMC_LLC_FLOW_ADD_LINK;
227 flow->type = SMC_LLC_FLOW_DEL_LINK;
231 flow->type = SMC_LLC_FLOW_RKEY;
234 flow->type = SMC_LLC_FLOW_NONE;
236 smc_llc_flow_qentry_set(flow, qentry);
241 /* start a new local llc flow, wait till current flow finished */
275 /* finish the current llc flow */
276 void smc_llc_flow_stop(struct smc_link_group *lgr, struct smc_llc_flow *flow)
279 memset(flow, 0, sizeof(*flow));
280 flow->type = SMC_LLC_FLOW_NONE;
283 flow == &lgr->llc_flow_lcl)
296 struct smc_llc_flow *flow = &lgr->llc_flow_lcl;
300 (flow->qentry ||
304 if (!flow->qentry ||
306 smc_llc_flow_qentry_del(flow);
309 rcv_msg = flow->qentry->msg.raw.hdr.common.type;
315 smc_llc_flow_qentry_clr(flow));
319 "msg %d exp %d flow %d role %d flags %x\n",
321 flow->type, lgr->role,
322 flow->qentry->msg.raw.hdr.flags);
323 smc_llc_flow_qentry_del(flow);
326 return flow->qentry;
1061 /* change flow type from ADD_LINK into DEL_LINK */
1165 /* ignore client add link recommendation, start new flow */
1244 /* enqueue a local add_link req to trigger a new add_link flow */
1275 /* enqueue a local del_link msg to trigger a new del_link flow,
1455 /* process a confirm_rkey request from peer, remote flow */
1492 /* process a delete_rkey request from peer, remote flow */
1570 /* a flow is waiting for this message */
1586 /* a flow is waiting for this message */
1603 /* new request from remote, assign to remote flow */
1616 /* new request from remote, assign to remote flow */
1665 struct smc_llc_flow *flow = &link->lgr->llc_flow_lcl;
1676 if (flowtype != SMC_LLC_FLOW_ADD_LINK || flow->qentry)
1677 break; /* drop out-of-flow response */
1680 if (flowtype != SMC_LLC_FLOW_DEL_LINK || flow->qentry)
1681 break; /* drop out-of-flow response */
1685 if (flowtype != SMC_LLC_FLOW_RKEY || flow->qentry)
1686 break; /* drop out-of-flow response */
1698 /* assign responses to the local flow, we requested them */