RDMA/uverbs: Move flow resources initialization

Use ib_set_flow() when initializing flow related resources.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Mark Bloch
2018-09-06 17:27:02 +03:00
committed by Jason Gunthorpe
parent 70cd20aed0
commit 86e1d464a8
5 changed files with 36 additions and 38 deletions

View File

@@ -4162,20 +4162,6 @@ ib_get_vector_affinity(struct ib_device *device, int comp_vector)
}
static inline void ib_set_flow(struct ib_uobject *uobj, struct ib_flow *ibflow,
struct ib_qp *qp, struct ib_device *device)
{
uobj->object = ibflow;
ibflow->uobject = uobj;
if (qp) {
atomic_inc(&qp->usecnt);
ibflow->qp = qp;
}
ibflow->device = device;
}
/**
* rdma_roce_rescan_device - Rescan all of the network devices in the system
* and add their gids, as needed, to the relevant RoCE devices.