[IBAL\IPOIB\INC\WSD\SDP\MTHCA] change 2 defines to match Linux ib_types.
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 7 Feb 2007 13:12:18 +0000 (13:12 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 7 Feb 2007 13:12:18 +0000 (13:12 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@584 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

16 files changed:
core/al/al_cm_qp.c
core/al/al_dm.c
core/al/kernel/al_ioc_pnp.c
hw/mthca/kernel/ib_verbs.h
hw/mthca/kernel/mthca_qp.c
inc/iba/ib_types.h
tests/alts/cmtests.c
tests/wsd/user/test2/ibwrap.c
tests/wsd/user/test3/ibwrap.c
tools/perftests/user/send_bw/send_bw.c
tools/perftests/user/send_lat/send_lat.c
tools/perftests/user/write_bw/write_bw.c
tools/perftests/user/write_lat/write_lat.c
ulp/dapl/dapl/ibal/dapl_ibal_cm.c
ulp/ipoib/kernel/ipoib_port.c
ulp/wsd/user/ibsp_ip.c

index cf367e7..187a81d 100644 (file)
@@ -690,7 +690,7 @@ __proc_lap(
                1, IB_DEFAULT_PKEY,\r
                conn_lap_path_get_svc_lvl( &p_lap->alternate_path ),\r
                IB_PATH_SELECTOR_EXACTLY,\r
-               IB_MTU_2048,\r
+               IB_MTU_LEN_2048,\r
                IB_PATH_SELECTOR_EXACTLY,\r
                conn_lap_path_get_pkt_rate( p_path ),\r
                IB_PATH_SELECTOR_EXACTLY,\r
index c858c76..75a2ef0 100644 (file)
@@ -1500,7 +1500,7 @@ dm_agent_get(
                get_io_unit_info( p_iou, p_dm_mad );\r
                break;\r
 \r
-       case IB_MAD_ATTR_IOC_PROFILE:\r
+       case IB_MAD_ATTR_IO_CONTROLLER_PROFILE:\r
        {\r
                uint8_t         slot;\r
 \r
index 6046923..d45dc2d 100644 (file)
@@ -2069,7 +2069,7 @@ __ioc_pnp_recv_cb(
                                (ib_dm_mad_t*)p_mad_response->p_mad_buf );\r
                        break;\r
 \r
-               case IB_MAD_ATTR_IOC_PROFILE:\r
+               case IB_MAD_ATTR_IO_CONTROLLER_PROFILE:\r
                        p_iou = (iou_node_t* __ptr64)p_mad_response->send_context2;\r
                        __ioc_profile_resp( p_iou,\r
                                (ib_dm_mad_t*)p_mad_response->p_mad_buf );\r
@@ -2386,7 +2386,7 @@ __query_ioc_profiles(
                                        break;\r
 \r
                                __format_dm_get( p_results, p_iou, p_iou->p_config_path,\r
-                                       IB_MAD_ATTR_IOC_PROFILE, cl_hton32( slot ), p_mad );\r
+                                       IB_MAD_ATTR_IO_CONTROLLER_PROFILE, cl_hton32( slot ), p_mad );\r
 \r
                                /* Chain the MAD up. */\r
                                p_mad->p_next = p_mad_list;\r
index 192c24a..af98d42 100644 (file)
@@ -121,11 +121,11 @@ struct ib_device_attr {
 static inline int ib_mtu_enum_to_int(int mtu)
 {
        switch (mtu) {
-       case IB_MTU_256:  return  256;
-       case IB_MTU_512:  return  512;
-       case IB_MTU_1024: return 1024;
-       case IB_MTU_2048: return 2048;
-       case IB_MTU_4096: return 4096;
+       case IB_MTU_LEN_256:  return  256;
+       case IB_MTU_LEN_512:  return  512;
+       case IB_MTU_LEN_1024: return 1024;
+       case IB_MTU_LEN_2048: return 2048;
+       case IB_MTU_LEN_4096: return 4096;
        default:          return -1;
        }
 }
index 8232bcc..a07b4da 100644 (file)
@@ -635,9 +635,9 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
        /* leave tavor_sched_queue as 0 */
 
        if (qp->transport == MLX || qp->transport == UD)
-               qp_context->mtu_msgmax = (IB_MTU_2048 << 5) | 11;
+               qp_context->mtu_msgmax = (IB_MTU_LEN_2048 << 5) | 11;
        else if (attr_mask & IB_QP_PATH_MTU) {
-               if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_2048) {
+               if (attr->path_mtu < IB_MTU_LEN_256 || attr->path_mtu > IB_MTU_LEN_2048) {
                        HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_QP,
                                ("path MTU (%u) is invalid\n", attr->path_mtu));
                        goto out_mailbox;
index abc0243..62ebb81 100644 (file)
@@ -1,5 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 2004-2006 Voltaire, Inc.  All rights reserved.\r
+ * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
@@ -1339,16 +1341,17 @@ ib_class_is_rmpp(
 */\r
 #define IB_MAD_ATTR_IO_UNIT_INFO                       (CL_NTOH16(0x0010))\r
 /**********/\r
-/****d* IBA Base: Constants/IB_MAD_ATTR_IOC_PROFILE\r
+
+/****d* IBA Base: Constants/IB_MAD_ATTR_IO_CONTROLLER_PROFILE
 * NAME\r
-*      IB_MAD_ATTR_IOC_PROFILE\r
+*      IB_MAD_ATTR_IO_CONTROLLER_PROFILE
 *\r
 * DESCRIPTION\r
 *      IOControllerProfile attribute (16.3.3)\r
 *\r
 * SOURCE\r
 */\r
-#define IB_MAD_ATTR_IOC_PROFILE                                (CL_NTOH16(0x0011))\r
+#define IB_MAD_ATTR_IO_CONTROLLER_PROFILE      (CL_NTOH16(0x0011))
 /**********/\r
 /****d* IBA Base: Constants/IB_MAD_ATTR_SERVICE_ENTRIES\r
 * NAME\r
@@ -1509,9 +1512,9 @@ ib_class_is_rmpp(
 #define IB_NOTICE_NODE_TYPE_SUBN_MGMT          (CL_NTOH32(0x000004))\r
 /**********/\r
 \r
-/****d* IBA Base: Constants/IB_MTU_TYPE\r
+/****d* IBA Base: Constants/IB_MTU_LEN_TYPE
 * NAME\r
-*      IB_MTU_TYPE\r
+*      IB_MTU_LEN_TYPE
 *\r
 * DESCRIPTION\r
 *      Encoded path MTU.\r
@@ -1524,11 +1527,15 @@ ib_class_is_rmpp(
 *\r
 * SOURCE\r
 */\r
-#define IB_MTU_256                                                     1\r
-#define IB_MTU_512                                                     2\r
-#define IB_MTU_1024                                                    3\r
-#define IB_MTU_2048                                                    4\r
-#define IB_MTU_4096                                                    5\r
+#define IB_MTU_LEN_256                                                 1
+#define IB_MTU_LEN_512                                                 2
+#define IB_MTU_LEN_1024                                                        3
+#define IB_MTU_LEN_2048                                                        4
+#define IB_MTU_LEN_4096                                                        5
+
+#define IB_MIN_MTU    IB_MTU_LEN_256
+#define IB_MAX_MTU    IB_MTU_LEN_4096
+
 /**********/\r
 \r
 /****d* IBA Base: Constants/IB_PATH_SELECTOR_TYPE\r
index 235bdb0..7e7661a 100644 (file)
@@ -2251,7 +2251,7 @@ alts_cm_client_server(
        p_path_client->dlid = p_ca_obj->dlid;\r
        p_path_client->num_path = 1;\r
        p_path_client->pkey = p_ca_obj->p_src_port_attr->p_pkey_table[0];\r
-       p_path_client->mtu = IB_MTU_256;\r
+       p_path_client->mtu = IB_MTU_LEN_256;\r
        p_path_client->pkt_life = 10;\r
 \r
        cl_memclr( p_req_client, sizeof(ib_cm_req_t) );\r
index 2441b77..50a6cce 100644 (file)
@@ -292,7 +292,7 @@ int connect_qp(struct qp_pack *qp1, struct qp_pack *qp2)
        qp_mod.state.rtr.primary_av.port_num = qp1->hca_port->port_num;\r
        \r
        qp_mod.state.rtr.primary_av.conn.local_ack_timeout = 0;\r
-       qp_mod.state.rtr.primary_av.conn.path_mtu = IB_MTU_2048;\r
+       qp_mod.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_2048;\r
        qp_mod.state.rtr.primary_av.conn.rnr_retry_cnt = 6;\r
        qp_mod.state.rtr.primary_av.conn.seq_err_retry_cnt = 6;\r
 \r
index 10223e0..dd3e90d 100644 (file)
@@ -296,7 +296,7 @@ int connect_qp(struct qp_pack *qp1, struct qp_pack *qp2)
        qp_mod.state.rtr.primary_av.port_num = qp1->hca_port->port_num;\r
        \r
        qp_mod.state.rtr.primary_av.conn.local_ack_timeout = 0;\r
-       qp_mod.state.rtr.primary_av.conn.path_mtu = IB_MTU_2048;\r
+       qp_mod.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_2048;\r
        qp_mod.state.rtr.primary_av.conn.rnr_retry_cnt = 6;\r
        qp_mod.state.rtr.primary_av.conn.seq_err_retry_cnt = 6;\r
 \r
index e52e100..48f23b6 100644 (file)
@@ -330,16 +330,16 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
        attr.req_state          = IB_QPS_RTR;
        switch (user_parm->mtu) {
        case 256 : 
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_256;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_256;
                break;
        case 512 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_512;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_512;
                break;
        case 1024 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_1024;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_1024;
                break;
        case 2048 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_2048;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_2048;
                break;
        }
        printf("Mtu : %d\n", user_parm->mtu);
index 8f40240..9d04122 100644 (file)
@@ -360,16 +360,16 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
        attr.req_state          = IB_QPS_RTR;
        switch (user_parm->mtu) {
        case 256 : 
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_256;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_256;
                break;
        case 512 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_512;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_512;
                break;
        case 1024 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_1024;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_1024;
                break;
        case 2048 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_2048;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_2048;
                break;
        }
        printf("Mtu : %d\n", user_parm->mtu);
index 9049683..3bee990 100644 (file)
@@ -322,16 +322,16 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
        attr.req_state          = IB_QPS_RTR;
        switch (user_parm->mtu) {
        case 256 : 
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_256;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_256;
                break;
        case 512 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_512;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_512;
                break;
        case 1024 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_1024;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_1024;
                break;
        case 2048 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_2048;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_2048;
                break;
        }
        printf("Mtu : %d\n", user_parm->mtu);
index 579198c..85921e3 100644 (file)
@@ -326,16 +326,16 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
        attr.req_state          = IB_QPS_RTR;
        switch (user_parm->mtu) {
        case 256 : 
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_256;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_256;
                break;
        case 512 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_512;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_512;
                break;
        case 1024 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_1024;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_1024;
                break;
        case 2048 :
-               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_2048;
+               attr.state.rtr.primary_av.conn.path_mtu = IB_MTU_LEN_2048;
                break;
        }
        printf("Mtu : %d\n", user_parm->mtu);
index cd180bd..eacf304 100644 (file)
@@ -1224,11 +1224,11 @@ dapls_ib_connect (
         * with 1K MTU.  Cap the MTU based on device ID to compensate for this.\r
         */\r
        if( (p_ca->p_ca_attr->dev_id == 0x5A44) &&\r
-               (ib_path_rec_mtu( &path_rec ) > IB_MTU_1024) )\r
+               (ib_path_rec_mtu( &path_rec ) > IB_MTU_LEN_1024) )\r
        {\r
                /* Local endpoint is Tavor - cap MTU to 1K for extra bandwidth. */\r
                path_rec.mtu &= IB_PATH_REC_SELECTOR_MASK;\r
-               path_rec.mtu |= IB_MTU_1024;\r
+               path_rec.mtu |= IB_MTU_LEN_1024;\r
        }\r
 \r
        /* \r
index f1d1a61..70e80f2 100644 (file)
@@ -5027,7 +5027,7 @@ __port_create_bcast(
        mcast_req.member_rec.qkey =\r
                (uint32_t)(uintn_t)p_port | IB_QP_PRIVILEGED_Q_KEY;\r
        mcast_req.member_rec.mtu =\r
-               (IB_PATH_SELECTOR_EXACTLY << 6) | IB_MTU_2048;\r
+               (IB_PATH_SELECTOR_EXACTLY << 6) | IB_MTU_LEN_2048;\r
 \r
        mcast_req.member_rec.pkey = IB_DEFAULT_PKEY;\r
 \r
index b0a9572..b377bb1 100644 (file)
@@ -478,11 +478,11 @@ query_pr(
        }\r
 \r
        if( (port->hca->dev_id == 0x5A44) &&\r
-               (ib_path_rec_mtu( path_rec ) > IB_MTU_1024) )\r
+               (ib_path_rec_mtu( path_rec ) > IB_MTU_LEN_1024) )\r
        {\r
                /* Local endpoint is Tavor - cap MTU to 1K for extra bandwidth. */\r
                path_rec->mtu &= IB_PATH_REC_SELECTOR_MASK;\r
-               path_rec->mtu |= IB_MTU_1024;\r
+               path_rec->mtu |= IB_MTU_LEN_1024;\r
        }\r
 \r
        pkt_life = ib_path_rec_pkt_life( path_rec ) + g_pkt_life_modifier;\r