IB/core: Change ib_create_cq to use struct ib_cq_init_attr
Currently, ib_create_cq uses cqe and comp_vecotr instead of the extendible ib_cq_init_attr struct. Earlier patches already changed the vendors to work with ib_cq_init_attr. This patch changes the consumers too. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
bcf4c1ea58
commit
8e37210b38
@@ -247,6 +247,7 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
|
||||
struct rds_ib_connection *ic = conn->c_transport_data;
|
||||
struct ib_device *dev = ic->i_cm_id->device;
|
||||
struct ib_qp_init_attr attr;
|
||||
struct ib_cq_init_attr cq_attr = {};
|
||||
struct rds_ib_device *rds_ibdev;
|
||||
int ret;
|
||||
|
||||
@@ -270,9 +271,10 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
|
||||
ic->i_pd = rds_ibdev->pd;
|
||||
ic->i_mr = rds_ibdev->mr;
|
||||
|
||||
cq_attr.cqe = ic->i_send_ring.w_nr + 1;
|
||||
ic->i_send_cq = ib_create_cq(dev, rds_ib_send_cq_comp_handler,
|
||||
rds_ib_cq_event_handler, conn,
|
||||
ic->i_send_ring.w_nr + 1, 0);
|
||||
&cq_attr);
|
||||
if (IS_ERR(ic->i_send_cq)) {
|
||||
ret = PTR_ERR(ic->i_send_cq);
|
||||
ic->i_send_cq = NULL;
|
||||
@@ -280,9 +282,10 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
|
||||
goto out;
|
||||
}
|
||||
|
||||
cq_attr.cqe = ic->i_recv_ring.w_nr;
|
||||
ic->i_recv_cq = ib_create_cq(dev, rds_ib_recv_cq_comp_handler,
|
||||
rds_ib_cq_event_handler, conn,
|
||||
ic->i_recv_ring.w_nr, 0);
|
||||
&cq_attr);
|
||||
if (IS_ERR(ic->i_recv_cq)) {
|
||||
ret = PTR_ERR(ic->i_recv_cq);
|
||||
ic->i_recv_cq = NULL;
|
||||
|
@@ -179,6 +179,7 @@ static int rds_iw_init_qp_attrs(struct ib_qp_init_attr *attr,
|
||||
void *context)
|
||||
{
|
||||
struct ib_device *dev = rds_iwdev->dev;
|
||||
struct ib_cq_init_attr cq_attr = {};
|
||||
unsigned int send_size, recv_size;
|
||||
int ret;
|
||||
|
||||
@@ -198,9 +199,10 @@ static int rds_iw_init_qp_attrs(struct ib_qp_init_attr *attr,
|
||||
attr->sq_sig_type = IB_SIGNAL_REQ_WR;
|
||||
attr->qp_type = IB_QPT_RC;
|
||||
|
||||
cq_attr.cqe = send_size;
|
||||
attr->send_cq = ib_create_cq(dev, send_cq_handler,
|
||||
rds_iw_cq_event_handler,
|
||||
context, send_size, 0);
|
||||
context, &cq_attr);
|
||||
if (IS_ERR(attr->send_cq)) {
|
||||
ret = PTR_ERR(attr->send_cq);
|
||||
attr->send_cq = NULL;
|
||||
@@ -208,9 +210,10 @@ static int rds_iw_init_qp_attrs(struct ib_qp_init_attr *attr,
|
||||
goto out;
|
||||
}
|
||||
|
||||
cq_attr.cqe = recv_size;
|
||||
attr->recv_cq = ib_create_cq(dev, recv_cq_handler,
|
||||
rds_iw_cq_event_handler,
|
||||
context, recv_size, 0);
|
||||
context, &cq_attr);
|
||||
if (IS_ERR(attr->recv_cq)) {
|
||||
ret = PTR_ERR(attr->recv_cq);
|
||||
attr->recv_cq = NULL;
|
||||
|
Reference in New Issue
Block a user