mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
hw/rdma: Add Query QP operation
This operation is needed by rdma devices - implement it. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
This commit is contained in:
parent
4c2c101590
commit
c99f217431
4 changed files with 35 additions and 0 deletions
|
@ -453,6 +453,24 @@ int rdma_rm_modify_qp(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int rdma_rm_query_qp(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,
|
||||
uint32_t qp_handle, struct ibv_qp_attr *attr,
|
||||
int attr_mask, struct ibv_qp_init_attr *init_attr)
|
||||
{
|
||||
RdmaRmQP *qp;
|
||||
|
||||
pr_dbg("qpn=%d\n", qp_handle);
|
||||
|
||||
qp = rdma_rm_get_qp(dev_res, qp_handle);
|
||||
if (!qp) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pr_dbg("qp_type=%d\n", qp->qp_type);
|
||||
|
||||
return rdma_backend_query_qp(&qp->backend_qp, attr, attr_mask, init_attr);
|
||||
}
|
||||
|
||||
void rdma_rm_dealloc_qp(RdmaDeviceResources *dev_res, uint32_t qp_handle)
|
||||
{
|
||||
RdmaRmQP *qp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue