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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user