1 When creating a new user context, exit if the kernel
2 does not support XRC. (OFED libmlx4 has a compatibility problem).
4 Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
6 Index: libmlx4/src/mlx4.c
7 ===================================================================
8 --- libmlx4.orig/src/mlx4.c 2009-05-10 12:16:33.000000000 +0300
9 +++ libmlx4/src/mlx4.c 2009-05-10 12:30:06.000000000 +0300
11 context->max_qp_wr = dev_attrs.max_qp_wr;
12 context->max_sge = dev_attrs.max_sge;
13 context->max_cqe = dev_attrs.max_cqe;
14 + if (!(dev_attrs.device_cap_flags & IBV_DEVICE_XRC)) {
15 + fprintf(stderr, PFX "There is a mismatch between "
16 + "the kernel and the userspace libraries: "
17 + "Kernel does not support XRC. Exiting.\n");
21 return &context->ibv_ctx;