Lines Matching defs: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);
1031 int smc_llc_cli_add_link(struct smc_link *link, struct smc_llc_qentry *qentry)
1033 struct smc_llc_msg_add_link *llc = &qentry->msg.add_link;
1119 smc_llc_cli_add_link_reject(qentry);
1122 kfree(qentry);
1166 struct smc_llc_qentry *qentry)
1196 kfree(qentry);
1219 struct smc_llc_qentry *qentry;
1221 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1224 if (smc_llc_is_local_add_link(&qentry->msg))
1225 smc_llc_cli_add_link_invite(qentry->link, qentry);
1227 smc_llc_cli_add_link(qentry->link, qentry);
1291 struct smc_llc_qentry *qentry;
1311 qentry = smc_llc_wait(lgr, lnk_new, SMC_LLC_WAIT_TIME,
1313 if (!qentry) {
1328 struct smc_llc_qentry *qentry = NULL;
1340 qentry = smc_llc_wait(lgr, link, SMC_LLC_WAIT_TIME,
1342 if (!qentry) {
1346 addc_llc = &qentry->msg.add_link_cont;
1368 struct smc_llc_qentry *qentry = NULL;
1376 qentry = smc_llc_wait(lgr, link, SMC_LLC_WAIT_FIRST_TIME, 0);
1377 if (!qentry ||
1378 qentry->msg.raw.hdr.common.llc_type != SMC_LLC_CONFIRM_LINK) {
1382 if (qentry)
1386 smc_llc_save_peer_uid(qentry);
1397 static void smc_llc_send_req_add_link_response(struct smc_llc_qentry *qentry)
1399 qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
1400 smc_llc_init_msg_hdr(&qentry->msg.raw.hdr, qentry->link->lgr,
1401 sizeof(qentry->msg));
1402 memset(&qentry->msg.raw.data, 0, sizeof(qentry->msg.raw.data));
1403 smc_llc_send_message(qentry->link, &qentry->msg);
1412 struct smc_llc_qentry *qentry = NULL;
1477 qentry = smc_llc_wait(lgr, link, SMC_LLC_WAIT_TIME, SMC_LLC_ADD_LINK);
1478 if (!qentry) {
1482 add_llc = &qentry->msg.add_link;
1531 struct smc_link *link = lgr->llc_flow_lcl.qentry->link;
1532 struct smc_llc_qentry *qentry;
1535 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1538 rc = smc_llc_srv_add_link(link, qentry);
1544 kfree(qentry);
1598 struct smc_llc_qentry *qentry;
1602 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1603 lnk = qentry->link;
1604 del_llc = &qentry->msg.delete_link;
1622 smc_llc_send_message(lnk, &qentry->msg);
1628 smc_llc_send_message(lnk, &qentry->msg); /* response */
1646 kfree(qentry);
1676 struct smc_llc_qentry *qentry;
1681 qentry = smc_llc_flow_qentry_clr(&lgr->llc_flow_lcl);
1682 lnk = qentry->link;
1683 del_llc = &qentry->msg.delete_link;
1685 if (qentry->msg.delete_link.hd.flags & SMC_LLC_FLAG_DEL_LINK_ALL) {
1688 qentry->msg.delete_link.reason));
1708 /* qentry is either a request from peer (send it back to
1712 if (!smc_llc_send_message(lnk, &qentry->msg)) {
1737 kfree(qentry);
1763 struct smc_llc_qentry *qentry;
1769 qentry = lgr->llc_flow_rmt.qentry;
1770 llc = &qentry->msg.confirm_rkey;
1771 link = qentry->link;
1795 smc_llc_send_message(link, &qentry->msg);
1803 struct smc_llc_qentry *qentry;
1808 qentry = lgr->llc_flow_rmt.qentry;
1809 llc = &qentry->msg.delete_rkey;
1810 link = qentry->link;
1849 smc_llc_send_message(link, &qentry->msg);
1865 struct smc_llc_qentry *qentry, *q;
1868 list_for_each_entry_safe(qentry, q, &lgr->llc_event_q, list) {
1869 list_del_init(&qentry->list);
1870 kfree(qentry);
1875 static void smc_llc_event_handler(struct smc_llc_qentry *qentry)
1877 union smc_llc_msg *llc = &qentry->msg;
1878 struct smc_link *link = qentry->link;
1898 qentry)) {
1904 !lgr->llc_flow_lcl.qentry) {
1907 qentry);
1916 qentry);
1920 if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1923 } else if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1932 smc_llc_flow_qentry_set(&lgr->llc_flow_lcl, qentry);
1939 !lgr->llc_flow_lcl.qentry) {
1941 smc_llc_flow_qentry_set(&lgr->llc_flow_lcl, qentry);
1943 } else if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1949 if (smc_llc_flow_start(&lgr->llc_flow_rmt, qentry)) {
1962 if (smc_llc_flow_start(&lgr->llc_flow_rmt, qentry)) {
1977 if (smc_llc_flow_start(&lgr->llc_flow_lcl, qentry)) {
1990 kfree(qentry);
1998 struct smc_llc_qentry *qentry;
2001 qentry = lgr->delayed_event;
2003 if (smc_link_usable(qentry->link))
2004 smc_llc_event_handler(qentry);
2006 kfree(qentry);
2012 qentry = list_first_entry(&lgr->llc_event_q,
2014 list_del_init(&qentry->list);
2016 smc_llc_event_handler(qentry);
2024 struct smc_llc_qentry *qentry)
2028 u8 llc_type = qentry->msg.raw.hdr.common.llc_type;
2038 if (flowtype != SMC_LLC_FLOW_ADD_LINK || flow->qentry)
2042 if (flowtype != SMC_LLC_FLOW_DEL_LINK || flow->qentry)
2047 if (flowtype != SMC_LLC_FLOW_RKEY || flow->qentry)
2055 qentry->msg.raw.hdr.common.type);
2058 kfree(qentry);
2062 smc_llc_flow_qentry_set(&link->lgr->llc_flow_lcl, qentry);
2069 struct smc_llc_qentry *qentry;
2072 qentry = kmalloc(sizeof(*qentry), GFP_ATOMIC);
2073 if (!qentry)
2075 qentry->link = link;
2076 INIT_LIST_HEAD(&qentry->list);
2077 memcpy(&qentry->msg, llc, sizeof(union smc_llc_msg));
2082 smc_llc_rx_response(link, qentry);
2088 list_add_tail(&qentry->list, &lgr->llc_event_q);
2221 struct smc_llc_qentry *qentry = NULL;
2228 qentry = smc_llc_wait(lgr, send_link, SMC_LLC_WAIT_TIME,
2230 if (!qentry || (qentry->msg.raw.hdr.flags & SMC_LLC_FLAG_RKEY_NEG))
2233 if (qentry)
2242 struct smc_llc_qentry *qentry = NULL;
2255 qentry = smc_llc_wait(lgr, send_link, SMC_LLC_WAIT_TIME,
2257 if (!qentry || (qentry->msg.raw.hdr.flags & SMC_LLC_FLAG_RKEY_NEG))
2260 if (qentry)
2274 void smc_llc_save_peer_uid(struct smc_llc_qentry *qentry)
2276 memcpy(qentry->link->peer_link_uid, qentry->msg.confirm_link.link_uid,
2281 int smc_llc_eval_conf_link(struct smc_llc_qentry *qentry,
2285 qentry->link->link_id = qentry->msg.confirm_link.link_num;
2286 smc_llc_link_set_uid(qentry->link);
2288 if (!(qentry->msg.raw.hdr.flags & SMC_LLC_FLAG_NO_RMBE_EYEC))