Lines Matching refs:qentry

209 	struct smc_llc_qentry *qentry = flow->qentry;
211 flow->qentry = NULL;
212 return qentry;
217 struct smc_llc_qentry *qentry;
219 if (flow->qentry) {
220 qentry = flow->qentry;
221 flow->qentry = NULL;
222 kfree(qentry);
227 struct smc_llc_qentry *qentry)
229 flow->qentry = qentry;
233 struct smc_llc_qentry *qentry)
235 u8 msg_type = qentry->msg.raw.hdr.common.llc_type;
239 lgr->delayed_event = qentry;
248 qentry->msg.raw.hdr.common.type,
250 kfree(qentry);
255 struct smc_llc_qentry *qentry)
257 struct smc_link_group *lgr = qentry->link->lgr;
262 smc_llc_flow_parallel(lgr, flow->type, qentry);
266 switch (qentry->msg.raw.hdr.common.llc_type) {
280 smc_llc_flow_qentry_set(flow, qentry);
344 (flow->qentry ||
348 if (!flow->qentry ||
353 rcv_msg = flow->qentry->msg.raw.hdr.common.llc_type;
367 flow->qentry->msg.raw.hdr.flags);
371 return flow->qentry;
893 struct smc_llc_qentry *qentry;
903 qentry = smc_llc_wait(lgr, NULL, SMC_LLC_WAIT_TIME,
905 if (!qentry) {
909 addc_llc = &qentry->msg.add_link_cont;
931 static int smc_llc_cli_add_link_reject(struct smc_llc_qentry *qentry)
933 qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
934 qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_ADD_LNK_REJ;
935 qentry->msg.raw.hdr.add_link_rej_rsn = SMC_LLC_REJ_RSN_NO_ALT_PATH;
936 smc_llc_init_msg_hdr(&qentry->msg.raw.hdr, qentry->link->lgr,
937 sizeof(qentry->msg));
938 return smc_llc_send_message(qentry->link, &qentry->msg);
947 struct smc_llc_qentry *qentry = NULL;
951 qentry = smc_llc_wait(lgr, NULL, SMC_LLC_WAIT_FIRST_TIME, 0);
952 if (!qentry) {
958 if (qentry->msg.raw.hdr.common.llc_type != SMC_LLC_CONFIRM_LINK) {
960 qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
961 smc_llc_send_message(link, &qentry->msg);
965 smc_llc_save_peer_uid(qentry);
1030 int smc_llc_cli_add_link(struct smc_link *link, struct smc_llc_qentry *qentry)
1032 struct smc_llc_msg_add_link *llc = &qentry->msg.add_link;
1116 smc_llc_cli_add_link_reject(qentry);
1119 kfree(qentry);
1163 struct smc_llc_qentry *qentry)
1193 kfree(qentry);
1216 struct smc_llc_qentry *qentry;
1218 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1221 if (smc_llc_is_local_add_link(&qentry->msg))
1222 smc_llc_cli_add_link_invite(qentry->link, qentry);
1224 smc_llc_cli_add_link(qentry->link, qentry);
1288 struct smc_llc_qentry *qentry;
1308 qentry = smc_llc_wait(lgr, lnk_new, SMC_LLC_WAIT_TIME,
1310 if (!qentry) {
1325 struct smc_llc_qentry *qentry = NULL;
1337 qentry = smc_llc_wait(lgr, link, SMC_LLC_WAIT_TIME,
1339 if (!qentry) {
1343 addc_llc = &qentry->msg.add_link_cont;
1365 struct smc_llc_qentry *qentry = NULL;
1373 qentry = smc_llc_wait(lgr, link, SMC_LLC_WAIT_FIRST_TIME, 0);
1374 if (!qentry ||
1375 qentry->msg.raw.hdr.common.llc_type != SMC_LLC_CONFIRM_LINK) {
1379 if (qentry)
1383 smc_llc_save_peer_uid(qentry);
1394 static void smc_llc_send_req_add_link_response(struct smc_llc_qentry *qentry)
1396 qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
1397 smc_llc_init_msg_hdr(&qentry->msg.raw.hdr, qentry->link->lgr,
1398 sizeof(qentry->msg));
1399 memset(&qentry->msg.raw.data, 0, sizeof(qentry->msg.raw.data));
1400 smc_llc_send_message(qentry->link, &qentry->msg);
1409 struct smc_llc_qentry *qentry = NULL;
1474 qentry = smc_llc_wait(lgr, link, SMC_LLC_WAIT_TIME, SMC_LLC_ADD_LINK);
1475 if (!qentry) {
1479 add_llc = &qentry->msg.add_link;
1526 struct smc_link *link = lgr->llc_flow_lcl.qentry->link;
1527 struct smc_llc_qentry *qentry;
1530 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1533 rc = smc_llc_srv_add_link(link, qentry);
1539 kfree(qentry);
1593 struct smc_llc_qentry *qentry;
1597 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1598 lnk = qentry->link;
1599 del_llc = &qentry->msg.delete_link;
1617 smc_llc_send_message(lnk, &qentry->msg);
1623 smc_llc_send_message(lnk, &qentry->msg); /* response */
1641 kfree(qentry);
1671 struct smc_llc_qentry *qentry;
1676 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1677 lnk = qentry->link;
1678 del_llc = &qentry->msg.delete_link;
1680 if (qentry->msg.delete_link.hd.flags & SMC_LLC_FLAG_DEL_LINK_ALL) {
1683 qentry->msg.delete_link.reason));
1703 /* qentry is either a request from peer (send it back to
1707 if (!smc_llc_send_message(lnk, &qentry->msg)) {
1732 kfree(qentry);
1758 struct smc_llc_qentry *qentry;
1764 qentry = lgr->llc_flow_rmt.qentry;
1765 llc = &qentry->msg.confirm_rkey;
1766 link = qentry->link;
1790 smc_llc_send_message(link, &qentry->msg);
1798 struct smc_llc_qentry *qentry;
1803 qentry = lgr->llc_flow_rmt.qentry;
1804 llc = &qentry->msg.delete_rkey;
1805 link = qentry->link;
1840 smc_llc_send_message(link, &qentry->msg);
1856 struct smc_llc_qentry *qentry, *q;
1859 list_for_each_entry_safe(qentry, q, &lgr->llc_event_q, list) {
1860 list_del_init(&qentry->list);
1861 kfree(qentry);
1866 static void smc_llc_event_handler(struct smc_llc_qentry *qentry)
1868 union smc_llc_msg *llc = &qentry->msg;
1869 struct smc_link *link = qentry->link;
1889 qentry)) {
1895 !lgr->llc_flow_lcl.qentry) {
1898 qentry);
1907 qentry);
1911 if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1914 } else if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1923 smc_llc_flow_qentry_set(&lgr->llc_flow_lcl, qentry);
1930 !lgr->llc_flow_lcl.qentry) {
1932 smc_llc_flow_qentry_set(&lgr->llc_flow_lcl, qentry);
1934 } else if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1940 if (smc_llc_flow_start(&lgr->llc_flow_rmt, qentry)) {
1953 if (smc_llc_flow_start(&lgr->llc_flow_rmt, qentry)) {
1968 if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1981 kfree(qentry);
1989 struct smc_llc_qentry *qentry;
1992 qentry = lgr->delayed_event;
1994 if (smc_link_usable(qentry->link))
1995 smc_llc_event_handler(qentry);
1997 kfree(qentry);
2003 qentry = list_first_entry(&lgr->llc_event_q,
2005 list_del_init(&qentry->list);
2007 smc_llc_event_handler(qentry);
2015 struct smc_llc_qentry *qentry)
2019 u8 llc_type = qentry->msg.raw.hdr.common.llc_type;
2029 if (flowtype != SMC_LLC_FLOW_ADD_LINK || flow->qentry)
2033 if (flowtype != SMC_LLC_FLOW_DEL_LINK || flow->qentry)
2038 if (flowtype != SMC_LLC_FLOW_RKEY || flow->qentry)
2046 qentry->msg.raw.hdr.common.type);
2049 kfree(qentry);
2053 smc_llc_flow_qentry_set(&link->lgr->llc_flow_lcl, qentry);
2060 struct smc_llc_qentry *qentry;
2063 qentry = kmalloc(sizeof(*qentry), GFP_ATOMIC);
2064 if (!qentry)
2066 qentry->link = link;
2067 INIT_LIST_HEAD(&qentry->list);
2068 memcpy(&qentry->msg, llc, sizeof(union smc_llc_msg));
2073 smc_llc_rx_response(link, qentry);
2079 list_add_tail(&qentry->list, &lgr->llc_event_q);
2212 struct smc_llc_qentry *qentry = NULL;
2219 qentry = smc_llc_wait(lgr, send_link, SMC_LLC_WAIT_TIME,
2221 if (!qentry || (qentry->msg.raw.hdr.flags & SMC_LLC_FLAG_RKEY_NEG))
2224 if (qentry)
2233 struct smc_llc_qentry *qentry = NULL;
2246 qentry = smc_llc_wait(lgr, send_link, SMC_LLC_WAIT_TIME,
2248 if (!qentry || (qentry->msg.raw.hdr.flags & SMC_LLC_FLAG_RKEY_NEG))
2251 if (qentry)
2265 void smc_llc_save_peer_uid(struct smc_llc_qentry *qentry)
2267 memcpy(qentry->link->peer_link_uid, qentry->msg.confirm_link.link_uid,
2272 int smc_llc_eval_conf_link(struct smc_llc_qentry *qentry,
2276 qentry->link->link_id = qentry->msg.confirm_link.link_num;
2277 smc_llc_link_set_uid(qentry->link);
2279 if (!(qentry->msg.raw.hdr.flags & SMC_LLC_FLAG_NO_RMBE_EYEC))