diff options
author | Matan Barak <matanb@mellanox.com> | 2015-06-11 09:35:21 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-06-12 14:49:10 -0400 |
commit | 8e37210b38fb7d6aa06aebde763316ee955d44c0 (patch) | |
tree | 2ef8854af886906e1901e7c6f0b93a28ae515c6e /net/rds/ib_cm.c | |
parent | bcf4c1ea583cd213f0bafdbeb11d80f83c5f10e6 (diff) |
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>
Diffstat (limited to 'net/rds/ib_cm.c')
-rw-r--r-- | net/rds/ib_cm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index b8d1bdae8a2a..0da2a45b33bd 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c | |||
@@ -247,6 +247,7 @@ static int rds_ib_setup_qp(struct rds_connection *conn) | |||
247 | struct rds_ib_connection *ic = conn->c_transport_data; | 247 | struct rds_ib_connection *ic = conn->c_transport_data; |
248 | struct ib_device *dev = ic->i_cm_id->device; | 248 | struct ib_device *dev = ic->i_cm_id->device; |
249 | struct ib_qp_init_attr attr; | 249 | struct ib_qp_init_attr attr; |
250 | struct ib_cq_init_attr cq_attr = {}; | ||
250 | struct rds_ib_device *rds_ibdev; | 251 | struct rds_ib_device *rds_ibdev; |
251 | int ret; | 252 | int ret; |
252 | 253 | ||
@@ -270,9 +271,10 @@ static int rds_ib_setup_qp(struct rds_connection *conn) | |||
270 | ic->i_pd = rds_ibdev->pd; | 271 | ic->i_pd = rds_ibdev->pd; |
271 | ic->i_mr = rds_ibdev->mr; | 272 | ic->i_mr = rds_ibdev->mr; |
272 | 273 | ||
274 | cq_attr.cqe = ic->i_send_ring.w_nr + 1; | ||
273 | ic->i_send_cq = ib_create_cq(dev, rds_ib_send_cq_comp_handler, | 275 | ic->i_send_cq = ib_create_cq(dev, rds_ib_send_cq_comp_handler, |
274 | rds_ib_cq_event_handler, conn, | 276 | rds_ib_cq_event_handler, conn, |
275 | ic->i_send_ring.w_nr + 1, 0); | 277 | &cq_attr); |
276 | if (IS_ERR(ic->i_send_cq)) { | 278 | if (IS_ERR(ic->i_send_cq)) { |
277 | ret = PTR_ERR(ic->i_send_cq); | 279 | ret = PTR_ERR(ic->i_send_cq); |
278 | ic->i_send_cq = NULL; | 280 | ic->i_send_cq = NULL; |
@@ -280,9 +282,10 @@ static int rds_ib_setup_qp(struct rds_connection *conn) | |||
280 | goto out; | 282 | goto out; |
281 | } | 283 | } |
282 | 284 | ||
285 | cq_attr.cqe = ic->i_recv_ring.w_nr; | ||
283 | ic->i_recv_cq = ib_create_cq(dev, rds_ib_recv_cq_comp_handler, | 286 | ic->i_recv_cq = ib_create_cq(dev, rds_ib_recv_cq_comp_handler, |
284 | rds_ib_cq_event_handler, conn, | 287 | rds_ib_cq_event_handler, conn, |
285 | ic->i_recv_ring.w_nr, 0); | 288 | &cq_attr); |
286 | if (IS_ERR(ic->i_recv_cq)) { | 289 | if (IS_ERR(ic->i_recv_cq)) { |
287 | ret = PTR_ERR(ic->i_recv_cq); | 290 | ret = PTR_ERR(ic->i_recv_cq); |
288 | ic->i_recv_cq = NULL; | 291 | ic->i_recv_cq = NULL; |