Lines Matching full:qp
103 /* The caller of this function must hold the QP security
104 * mutex of the QP of the security structure in *pps.
108 * or the pps will be for the real QP and security structure
109 * will be for a shared QP.
150 /* The caller of this function must hold the QP security
163 /* If the QP is in the process of being destroyed in qp_to_error()
164 * the qp pointer in the security structure is in qp_to_error()
170 ib_modify_qp(sec->qp, in qp_to_error()
174 if (sec->qp->event_handler && sec->qp->qp_context) { in qp_to_error()
175 event.element.qp = sec->qp; in qp_to_error()
176 sec->qp->event_handler(&event, in qp_to_error()
177 sec->qp->qp_context); in qp_to_error()
183 struct ib_qp *qp = shared_qp_sec->qp; in qp_to_error() local
185 if (qp->event_handler && qp->qp_context) { in qp_to_error()
186 event.element.qp = qp; in qp_to_error()
187 event.device = qp->device; in qp_to_error()
188 qp->event_handler(&event, in qp_to_error()
189 qp->qp_context); in qp_to_error()
240 /* The caller of this function must hold the QP security
299 /* The caller of this function must hold the QP security
328 /* The caller of this function must hold the QP security
331 static struct ib_ports_pkeys *get_new_pps(const struct ib_qp *qp, in get_new_pps() argument
336 struct ib_ports_pkeys *qp_pps = qp->qp_sec->ports_pkeys; in get_new_pps()
368 new_pps->main.sec = qp->qp_sec; in get_new_pps()
369 new_pps->alt.sec = qp->qp_sec; in get_new_pps()
373 int ib_open_shared_qp_security(struct ib_qp *qp, struct ib_device *dev) in ib_open_shared_qp_security() argument
375 struct ib_qp *real_qp = qp->real_qp; in ib_open_shared_qp_security()
378 ret = ib_create_qp_security(qp, dev); in ib_open_shared_qp_security()
383 if (!qp->qp_sec) in ib_open_shared_qp_security()
388 qp->qp_sec); in ib_open_shared_qp_security()
393 if (qp != real_qp) in ib_open_shared_qp_security()
394 list_add(&qp->qp_sec->shared_qp_list, in ib_open_shared_qp_security()
399 destroy_qp_security(qp->qp_sec); in ib_open_shared_qp_security()
406 struct ib_qp *real_qp = sec->qp->real_qp; in ib_close_shared_qp_security()
415 int ib_create_qp_security(struct ib_qp *qp, struct ib_device *dev) in ib_create_qp_security() argument
431 qp->qp_sec = kzalloc_obj(*qp->qp_sec); in ib_create_qp_security()
432 if (!qp->qp_sec) in ib_create_qp_security()
435 qp->qp_sec->qp = qp; in ib_create_qp_security()
436 qp->qp_sec->dev = dev; in ib_create_qp_security()
437 mutex_init(&qp->qp_sec->mutex); in ib_create_qp_security()
438 INIT_LIST_HEAD(&qp->qp_sec->shared_qp_list); in ib_create_qp_security()
439 atomic_set(&qp->qp_sec->error_list_count, 0); in ib_create_qp_security()
440 init_completion(&qp->qp_sec->error_complete); in ib_create_qp_security()
441 ret = security_ib_alloc_security(&qp->qp_sec->security); in ib_create_qp_security()
443 kfree(qp->qp_sec); in ib_create_qp_security()
444 qp->qp_sec = NULL; in ib_create_qp_security()
459 /* Remove the QP from the lists so it won't get added to in ib_destroy_qp_security_begin()
467 /* If the QP is already in one or more of those lists in ib_destroy_qp_security_begin()
469 * doesn't operate on an undefined QP. in ib_destroy_qp_security_begin()
491 * QP security could be marked for an error state in ib_destroy_qp_security_abort()
530 * wait until this QP security structure is processed in ib_destroy_qp_security_end()
531 * in the QP to error flow before destroying it because in ib_destroy_qp_security_end()
571 int ib_security_modify_qp(struct ib_qp *qp, in ib_security_modify_qp() argument
579 struct ib_qp *real_qp = qp->real_qp; in ib_security_modify_qp()
589 "%s: QP security is not initialized for IB QP: %u\n", in ib_security_modify_qp()
592 /* The port/pkey settings are maintained only for the real QP. Open in ib_security_modify_qp()
593 * handles on the real QP will be in the shared_qp_list. When in ib_security_modify_qp()
594 * enforcing security on the real QP all the shared QPs will be in ib_security_modify_qp()
607 /* Add this QP to the lists for the new port in ib_security_modify_qp()
612 * sending the QP to error. in ib_security_modify_qp()
726 if (agent->qp->qp_type == IB_QPT_SMI) { in ib_mad_agent_security_cleanup()
740 if (map->agent.qp->qp_type == IB_QPT_SMI) { in ib_mad_enforce_security()