RDMA: Cleanup undesired pd->uobject usage
Drivers should be using udata to determine if a method is invoked from user space or kernel space. A pd does not necessarily say a different objects is kernel or user. Transforming the tests to use udata eliminates a large number of uobject references from the drivers. Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
af8d70375d
commit
e00b64f7c5
@@ -1066,7 +1066,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
|
||||
}
|
||||
if (req.user_qp_buffer)
|
||||
nesqp->nesuqp_addr = req.user_qp_buffer;
|
||||
if ((ibpd->uobject) && (ibpd->uobject->context)) {
|
||||
if (udata && (ibpd->uobject->context)) {
|
||||
nesqp->user_mode = 1;
|
||||
nes_ucontext = to_nesucontext(ibpd->uobject->context);
|
||||
if (virt_wqs) {
|
||||
@@ -1257,7 +1257,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
|
||||
|
||||
nes_put_cqp_request(nesdev, cqp_request);
|
||||
|
||||
if (ibpd->uobject) {
|
||||
if (udata) {
|
||||
uresp.mmap_sq_db_index = nesqp->mmap_sq_db_index;
|
||||
uresp.mmap_rq_db_index = 0;
|
||||
uresp.actual_sq_size = sq_size;
|
||||
|
Reference in New Issue
Block a user