Lines Matching refs:qentry

166 	struct smc_llc_qentry *qentry = flow->qentry;
168 flow->qentry = NULL;
169 return qentry;
174 struct smc_llc_qentry *qentry;
176 if (flow->qentry) {
177 qentry = flow->qentry;
178 flow->qentry = NULL;
179 kfree(qentry);
184 struct smc_llc_qentry *qentry)
186 flow->qentry = qentry;
190 struct smc_llc_qentry *qentry)
192 u8 msg_type = qentry->msg.raw.hdr.common.type;
196 lgr->delayed_event = qentry;
204 qentry->msg.raw.hdr.common.type,
206 kfree(qentry);
211 struct smc_llc_qentry *qentry)
213 struct smc_link_group *lgr = qentry->link->lgr;
218 smc_llc_flow_parallel(lgr, flow->type, qentry);
222 switch (qentry->msg.raw.hdr.common.type) {
236 smc_llc_flow_qentry_set(flow, qentry);
300 (flow->qentry ||
304 if (!flow->qentry ||
309 rcv_msg = flow->qentry->msg.raw.hdr.common.type;
322 flow->qentry->msg.raw.hdr.flags);
326 return flow->qentry;
753 struct smc_llc_qentry *qentry;
763 qentry = smc_llc_wait(lgr, NULL, SMC_LLC_WAIT_TIME,
765 if (!qentry) {
769 addc_llc = &qentry->msg.add_link_cont;
791 static int smc_llc_cli_add_link_reject(struct smc_llc_qentry *qentry)
793 qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
794 qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_ADD_LNK_REJ;
795 qentry->msg.raw.hdr.add_link_rej_rsn = SMC_LLC_REJ_RSN_NO_ALT_PATH;
796 return smc_llc_send_message(qentry->link, &qentry->msg);
805 struct smc_llc_qentry *qentry = NULL;
809 qentry = smc_llc_wait(lgr, NULL, SMC_LLC_WAIT_FIRST_TIME, 0);
810 if (!qentry) {
816 if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
818 qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
819 smc_llc_send_message(link, &qentry->msg);
823 smc_llc_save_peer_uid(qentry);
868 int smc_llc_cli_add_link(struct smc_link *link, struct smc_llc_qentry *qentry)
870 struct smc_llc_msg_add_link *llc = &qentry->msg.add_link;
929 smc_llc_cli_add_link_reject(qentry);
931 kfree(qentry);
937 struct smc_llc_qentry *qentry)
954 kfree(qentry);
977 struct smc_llc_qentry *qentry;
979 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
982 if (smc_llc_is_local_add_link(&qentry->msg))
983 smc_llc_cli_add_link_invite(qentry->link, qentry);
985 smc_llc_cli_add_link(qentry->link, qentry);
1049 struct smc_llc_qentry *qentry;
1069 qentry = smc_llc_wait(lgr, lnk_new, SMC_LLC_WAIT_TIME,
1071 if (!qentry) {
1086 struct smc_llc_qentry *qentry = NULL;
1098 qentry = smc_llc_wait(lgr, link, SMC_LLC_WAIT_TIME,
1100 if (!qentry) {
1104 addc_llc = &qentry->msg.add_link_cont;
1126 struct smc_llc_qentry *qentry = NULL;
1134 qentry = smc_llc_wait(lgr, link, SMC_LLC_WAIT_FIRST_TIME, 0);
1135 if (!qentry ||
1136 qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
1140 if (qentry)
1144 smc_llc_save_peer_uid(qentry);
1160 struct smc_llc_qentry *qentry = NULL;
1187 qentry = smc_llc_wait(lgr, link, SMC_LLC_WAIT_TIME, SMC_LLC_ADD_LINK);
1188 if (!qentry) {
1192 add_llc = &qentry->msg.add_link;
1230 struct smc_link *link = lgr->llc_flow_lcl.qentry->link;
1294 struct smc_llc_qentry *qentry;
1298 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1299 lnk = qentry->link;
1300 del_llc = &qentry->msg.delete_link;
1318 smc_llc_send_message(lnk, &qentry->msg);
1324 smc_llc_send_message(lnk, &qentry->msg); /* response */
1342 kfree(qentry);
1372 struct smc_llc_qentry *qentry;
1377 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1378 lnk = qentry->link;
1379 del_llc = &qentry->msg.delete_link;
1381 if (qentry->msg.delete_link.hd.flags & SMC_LLC_FLAG_DEL_LINK_ALL) {
1384 qentry->msg.delete_link.reason));
1404 /* qentry is either a request from peer (send it back to
1408 if (!smc_llc_send_message(lnk, &qentry->msg)) {
1433 kfree(qentry);
1459 struct smc_llc_qentry *qentry;
1465 qentry = lgr->llc_flow_rmt.qentry;
1466 llc = &qentry->msg.confirm_rkey;
1467 link = qentry->link;
1488 smc_llc_send_message(link, &qentry->msg);
1496 struct smc_llc_qentry *qentry;
1501 qentry = lgr->llc_flow_rmt.qentry;
1502 llc = &qentry->msg.delete_rkey;
1503 link = qentry->link;
1515 smc_llc_send_message(link, &qentry->msg);
1530 struct smc_llc_qentry *qentry, *q;
1533 list_for_each_entry_safe(qentry, q, &lgr->llc_event_q, list) {
1534 list_del_init(&qentry->list);
1535 kfree(qentry);
1540 static void smc_llc_event_handler(struct smc_llc_qentry *qentry)
1542 union smc_llc_msg *llc = &qentry->msg;
1543 struct smc_link *link = qentry->link;
1563 qentry)) {
1569 !lgr->llc_flow_lcl.qentry) {
1572 qentry);
1575 qentry)) {
1578 } else if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1587 smc_llc_flow_qentry_set(&lgr->llc_flow_lcl, qentry);
1594 !lgr->llc_flow_lcl.qentry) {
1596 smc_llc_flow_qentry_set(&lgr->llc_flow_lcl, qentry);
1598 } else if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1604 if (smc_llc_flow_start(&lgr->llc_flow_rmt, qentry)) {
1617 if (smc_llc_flow_start(&lgr->llc_flow_rmt, qentry)) {
1628 kfree(qentry);
1636 struct smc_llc_qentry *qentry;
1639 qentry = lgr->delayed_event;
1641 if (smc_link_usable(qentry->link))
1642 smc_llc_event_handler(qentry);
1644 kfree(qentry);
1650 qentry = list_first_entry(&lgr->llc_event_q,
1652 list_del_init(&qentry->list);
1654 smc_llc_event_handler(qentry);
1662 struct smc_llc_qentry *qentry)
1666 u8 llc_type = qentry->msg.raw.hdr.common.type;
1676 if (flowtype != SMC_LLC_FLOW_ADD_LINK || flow->qentry)
1680 if (flowtype != SMC_LLC_FLOW_DEL_LINK || flow->qentry)
1685 if (flowtype != SMC_LLC_FLOW_RKEY || flow->qentry)
1695 kfree(qentry);
1699 smc_llc_flow_qentry_set(&link->lgr->llc_flow_lcl, qentry);
1706 struct smc_llc_qentry *qentry;
1709 qentry = kmalloc(sizeof(*qentry), GFP_ATOMIC);
1710 if (!qentry)
1712 qentry->link = link;
1713 INIT_LIST_HEAD(&qentry->list);
1714 memcpy(&qentry->msg, llc, sizeof(union smc_llc_msg));
1718 smc_llc_rx_response(link, qentry);
1724 list_add_tail(&qentry->list, &lgr->llc_event_q);
1850 struct smc_llc_qentry *qentry = NULL;
1857 qentry = smc_llc_wait(lgr, send_link, SMC_LLC_WAIT_TIME,
1859 if (!qentry || (qentry->msg.raw.hdr.flags & SMC_LLC_FLAG_RKEY_NEG))
1862 if (qentry)
1871 struct smc_llc_qentry *qentry = NULL;
1884 qentry = smc_llc_wait(lgr, send_link, SMC_LLC_WAIT_TIME,
1886 if (!qentry || (qentry->msg.raw.hdr.flags & SMC_LLC_FLAG_RKEY_NEG))
1889 if (qentry)
1903 void smc_llc_save_peer_uid(struct smc_llc_qentry *qentry)
1905 memcpy(qentry->link->peer_link_uid, qentry->msg.confirm_link.link_uid,
1910 int smc_llc_eval_conf_link(struct smc_llc_qentry *qentry,
1914 qentry->link->link_id = qentry->msg.confirm_link.link_num;
1915 smc_llc_link_set_uid(qentry->link);
1917 if (!(qentry->msg.raw.hdr.flags & SMC_LLC_FLAG_NO_RMBE_EYEC))