Lines Matching defs:flow

207 struct smc_llc_qentry *smc_llc_flow_qentry_clr(struct smc_llc_flow *flow)
209 struct smc_llc_qentry *qentry = flow->qentry;
211 flow->qentry = NULL;
215 void smc_llc_flow_qentry_del(struct smc_llc_flow *flow)
219 if (flow->qentry) {
220 qentry = flow->qentry;
221 flow->qentry = NULL;
226 static inline void smc_llc_flow_qentry_set(struct smc_llc_flow *flow,
229 flow->qentry = qentry;
245 "LLC msg: msg %d flow %d role %d\n",
253 /* try to start a new llc flow, initiated by an incoming llc msg */
254 static bool smc_llc_flow_start(struct smc_llc_flow *flow,
260 if (flow->type) {
261 /* a flow is already active */
262 smc_llc_flow_parallel(lgr, flow->type, qentry);
268 flow->type = SMC_LLC_FLOW_ADD_LINK;
271 flow->type = SMC_LLC_FLOW_DEL_LINK;
275 flow->type = SMC_LLC_FLOW_RKEY;
278 flow->type = SMC_LLC_FLOW_NONE;
280 smc_llc_flow_qentry_set(flow, qentry);
285 /* start a new local llc flow, wait till current flow finished */
319 /* finish the current llc flow */
320 void smc_llc_flow_stop(struct smc_link_group *lgr, struct smc_llc_flow *flow)
323 memset(flow, 0, sizeof(*flow));
324 flow->type = SMC_LLC_FLOW_NONE;
327 flow == &lgr->llc_flow_lcl)
340 struct smc_llc_flow *flow = &lgr->llc_flow_lcl;
344 (flow->qentry ||
348 if (!flow->qentry ||
350 smc_llc_flow_qentry_del(flow);
353 rcv_msg = flow->qentry->msg.raw.hdr.common.llc_type;
359 smc_llc_flow_qentry_clr(flow));
363 "msg %d exp %d flow %d role %d flags %x\n",
366 flow->type, lgr->role,
367 flow->qentry->msg.raw.hdr.flags);
368 smc_llc_flow_qentry_del(flow);
371 return flow->qentry;
1155 /* set REQ_ADD_LINK flow and wait for response from peer */
1300 /* change flow type from ADD_LINK into DEL_LINK */
1430 /* ignore client add link recommendation, start new flow */
1542 /* enqueue a local add_link req to trigger a new add_link flow */
1574 /* enqueue a local del_link msg to trigger a new del_link flow,
1754 /* process a confirm_rkey request from peer, remote flow */
1794 /* process a delete_rkey request from peer, remote flow */
1896 /* a flow is waiting for this message */
1922 /* a flow is waiting for this message */
1939 /* new request from remote, assign to remote flow */
1952 /* new request from remote, assign to remote flow */
2018 struct smc_llc_flow *flow = &link->lgr->llc_flow_lcl;
2029 if (flowtype != SMC_LLC_FLOW_ADD_LINK || flow->qentry)
2030 break; /* drop out-of-flow response */
2033 if (flowtype != SMC_LLC_FLOW_DEL_LINK || flow->qentry)
2034 break; /* drop out-of-flow response */
2038 if (flowtype != SMC_LLC_FLOW_RKEY || flow->qentry)
2039 break; /* drop out-of-flow response */
2052 /* assign responses to the local flow, we requested them */