1 /** 2 * Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. 3 * 4 * See file LICENSE for terms. 5 */ 6 7 #include <uct/test_p2p_rma.h> 8 #include <uct/test_p2p_mix.h> 9 10 11 class uct_p2p_rma_test_inlresp : public uct_p2p_rma_test {}; 12 13 UCS_TEST_SKIP_COND_P(uct_p2p_rma_test_inlresp, get_bcopy_inlresp0, 14 !check_caps(UCT_IFACE_FLAG_GET_BCOPY), 15 "IB_TX_INLINE_RESP=0") { 16 test_xfer_multi(static_cast<send_func_t>(&uct_p2p_rma_test::get_bcopy), 17 1ul, sender().iface_attr().cap.get.max_bcopy, 18 TEST_UCT_FLAG_RECV_ZCOPY); 19 } 20 21 UCS_TEST_SKIP_COND_P(uct_p2p_rma_test_inlresp, get_bcopy_inlresp64, 22 !check_caps(UCT_IFACE_FLAG_GET_BCOPY), 23 "IB_TX_INLINE_RESP=64") { 24 test_xfer_multi(static_cast<send_func_t>(&uct_p2p_rma_test::get_bcopy), 25 1ul, sender().iface_attr().cap.get.max_bcopy, 26 TEST_UCT_FLAG_RECV_ZCOPY); 27 } 28 29 UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_rma_test_inlresp) 30 31 32 class uct_p2p_rma_test_alloc_methods : public uct_p2p_rma_test { 33 protected: test_put_zcopy()34 void test_put_zcopy() { 35 test_xfer_multi(static_cast<send_func_t>(&uct_p2p_rma_test::put_zcopy), 36 0, sender().iface_attr().cap.put.max_zcopy, 37 TEST_UCT_FLAG_SEND_ZCOPY); 38 } 39 test_get_zcopy()40 void test_get_zcopy() { 41 test_xfer_multi(static_cast<send_func_t>(&uct_p2p_rma_test::get_zcopy), 42 sender().iface_attr().cap.get.min_zcopy, 43 sender().iface_attr().cap.get.max_zcopy, 44 TEST_UCT_FLAG_RECV_ZCOPY); 45 } 46 }; 47 48 #ifdef IMPLICIT_ODP_FIXED 49 UCS_TEST_SKIP_COND_P(uct_p2p_rma_test_alloc_methods, xfer_reg_odp, 50 !check_caps(UCT_IFACE_FLAG_PUT_ZCOPY | 51 UCT_IFACE_FLAG_GET_ZCOPY), 52 "REG_METHODS=odp,direct", 53 "MLX5_DEVX_OBJECTS=dct,dcsrq") 54 { 55 test_put_zcopy(); 56 test_get_zcopy(); 57 } 58 #endif 59 60 UCS_TEST_SKIP_COND_P(uct_p2p_rma_test_alloc_methods, xfer_reg_rcache, 61 !check_caps(UCT_IFACE_FLAG_PUT_ZCOPY | 62 UCT_IFACE_FLAG_GET_ZCOPY), 63 "REG_METHODS=rcache,direct") 64 { 65 test_put_zcopy(); 66 test_get_zcopy(); 67 } 68 69 UCS_TEST_SKIP_COND_P(uct_p2p_rma_test_alloc_methods, xfer_reg_direct, 70 !check_caps(UCT_IFACE_FLAG_PUT_ZCOPY | 71 UCT_IFACE_FLAG_GET_ZCOPY), 72 "REG_METHODS=direct") 73 { 74 test_put_zcopy(); 75 test_get_zcopy(); 76 } 77 78 UCS_TEST_SKIP_COND_P(uct_p2p_rma_test_alloc_methods, xfer_reg_multithreaded, 79 !check_caps(UCT_IFACE_FLAG_PUT_ZCOPY | 80 UCT_IFACE_FLAG_GET_ZCOPY), 81 "REG_MT_THRESH=1", "REG_MT_CHUNK=1G", "REG_MT_BIND=y") 82 { 83 test_put_zcopy(); 84 test_get_zcopy(); 85 } 86 87 UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_rma_test_alloc_methods) 88 89 90 class uct_p2p_mix_test_alloc_methods : public uct_p2p_mix_test {}; 91 92 #ifdef IMPLICIT_ODP_FIXED 93 UCS_TEST_P(uct_p2p_mix_test_alloc_methods, mix1000_odp, 94 "REG_METHODS=odp,direct", "MLX5_DEVX_OBJECTS=dct,dcsrq") 95 { 96 run(1000); 97 } 98 #endif 99 100 UCS_TEST_P(uct_p2p_mix_test_alloc_methods, mix1000_rcache, 101 "REG_METHODS=rcache,direct") 102 { 103 run(1000); 104 } 105 106 UCS_TEST_P(uct_p2p_mix_test_alloc_methods, mix1000_multithreaded, 107 "REG_MT_THRESH=1", "REG_MT_CHUNK=1K", "REG_MT_BIND=y") 108 { 109 run(1000); 110 } 111 112 UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_mix_test_alloc_methods) 113 114 115 class uct_p2p_mix_test_indirect_atomic : public uct_p2p_mix_test {}; 116 117 UCS_TEST_P(uct_p2p_mix_test_indirect_atomic, mix1000_indirect_atomic, 118 "INDIRECT_ATOMIC=n") 119 { 120 run(1000); 121 } 122 123 UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_mix_test_indirect_atomic) 124 125