gen2_basic - make sure the DLID is valid

For valid address handles, make sure the DLID is not a multicast LID.
You can't modify a QP to use a multicast DLID using ib_modify_qp().

Signed-off by: Robert Walsh <[EMAIL PROTECTED]>

diff -rNu a/gen2_basic/test_cq.c b/gen2_basic/test_cq.c
--- a/gen2_basic/test_cq.c      2006-09-13 19:07:11.102264000 -0700
+++ b/gen2_basic/test_cq.c      2006-08-14 14:17:17.352167000 -0700
@@ -183,7 +183,7 @@
                        .rq_psn                 = 0,
                        .ah_attr                = {
                                .is_global      = 0,
-                               .dlid           = VL_random(rand_gen, 0xFFFF),
+                               .dlid           = VL_range(rand_gen, 1, 0xBFFF),
                                .sl             = 0,
                                .src_path_bits  = 0,
                                .port_num       = VL_range(rand_gen, 1, 
device_attr.phys_port_cnt)
diff -rNu a/gen2_basic/test_poll_post.c b/gen2_basic/test_poll_post.c
--- a/gen2_basic/test_poll_post.c       2006-09-13 19:07:12.325046000 -0700
+++ b/gen2_basic/test_poll_post.c       2006-08-14 14:17:03.705821000 -0700
@@ -196,7 +196,7 @@
                        .min_rnr_timer          = 12,
                        .ah_attr                = {
                                .is_global      = 0,
-                               .dlid           = VL_random(rand_gen, 0xFFFF),
+                               .dlid           = VL_range(rand_gen, 1, 0xBFFF),
                                .sl             = 0,
                                .src_path_bits  = 0,
                                .port_num       = port
diff -rNu a/gen2_basic/test_qp.c b/gen2_basic/test_qp.c
--- a/gen2_basic/test_qp.c      2006-09-13 19:07:11.118256000 -0700
+++ b/gen2_basic/test_qp.c      2006-08-14 14:16:57.911621000 -0700
@@ -1185,7 +1188,7 @@
                        .rq_psn                 = 0,
                        .ah_attr                = {
                                .is_global      = 0,
-                               .dlid           = VL_random(rand_gen, 0xFFFF),
+                               .dlid           = VL_range(rand_gen, 1, 0xBFFF),
                                .sl             = 0,
                                .src_path_bits  = 0,
                                .port_num       = VL_range(rand_gen, 1, 
device_attr.phys_port_cnt)
_______________________________________________
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to