Skip to contentSkip to conversation

rdma_create_qp() and max_send_wr

DISCUSSION Yann Droneaud 4 participants 4 messages Apr 21, 2011 – May 22, 2011 3 messages not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

Hi,

I have a problem with rdma_create_qp() when I set qp_init_attr.cap.max_send_wr to something higher than 16351:
it returns -1 and errno is set to ENOMEM "Cannot allocate memory".

strace doesn't show anything related to memory, but the last write() syscall returns EINVAL "Invalid Argument".

I'm using a Mellanox ConnectX MT26428 (v2.6.100 / a0) HCA, under Debian 6.0 (kernel 2.6.32-5, librdmacm 1.0.10-1, libibverbs 1.1.3-2, libmlx4 1.0-1).

According to ibv_query_device() informations, ibv_device_attr.max_qp_wr is 16384 (and ibv_device_attr.max_qp_wr is 16383). So one might think that 16383 outstanding WR should be OK.

I've also tried to increase the length of the associated CQ, but it doesn't change anything.

So what's the limit of WR in the QP's SQ ?
Is it ibv_device_attr.max_qp_wr - 32 ?

Regards.

Signature · 8 lines
Yann Droneaud
OPTEYA


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1303404264.2243.19.camel-H/[email protected]

#2 lore raw
Quoted 7 lines · Yann Droneaud

I have a problem with rdma_create_qp() when I set qp_init_attr.cap.max_send_wr to something higher than 16351:
it returns -1 and errno is set to ENOMEM "Cannot allocate memory".

strace doesn't show anything related to memory, but the last write() syscall returns EINVAL "Invalid Argument".

Quoted 7 lines

I'm using a Mellanox ConnectX MT26428 (v2.6.100 / a0) HCA, under Debian 6.0 (kernel 2.6.32-5, librdmacm 1.0.10-1, libibverbs 1.1.3-2, libmlx4 1.0-1).

According to ibv_query_device() informations, ibv_device_attr.max_qp_wr is 16384 (and ibv_device_attr.max_qp_wr is 16383). So one might think that 16383 outstanding WR should be OK.

Getting exactly the right value for max_qp_wr is kind of tricky because of complicated allocation rules. I guess this is just a mlx4 bug in reporting not quite the right value from ibv_query_device(). --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): BANLkTikUOv3mtgb3x_vbbk845_36fu1QhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw
Quoted 3 lines · Roland Dreier

Getting exactly the right value for max_qp_wr is kind of tricky because of complicated allocation rules. I guess this is just a mlx4 bug in reporting not quite the right value from ibv_query_device().

Maybe the correct way to go for mlx4 is to go min/max that is, report the --minimal-- of max(recv, send) value that would work for an app setting of either of their send or the recv WR numbers.

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 4DD8B13D.4070802-VPRAkNaXOzVWk0Htik3J/[email protected]

#6 lore raw
Quoted 5 lines · Or Gerlitz

Maybe the correct way to go for mlx4 is to go min/max that is, report the --minimal-- of max(recv, send) value that would work for an app setting of either of their send or the recv WR numbers.

I see that OFED already contains a fix for this that Jack pushed. So I guess Jack will send it for upstream submission.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html