]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/libmlx4/fixes/xrc_kernel_user_mismatch.patch
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / libmlx4 / fixes / xrc_kernel_user_mismatch.patch
1 When creating a new user context, exit if the kernel
2 does not support XRC. (OFED libmlx4 has a compatibility problem).
3
4 Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
5
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
10 @@ -190,6 +190,12 @@
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");
18 +               goto query_free;
19 +       }
20  
21         return &context->ibv_ctx;
22