]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
Add new type for PDs - IB_PDT_UD - to allow HCA driver to control how the AV
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 20 Jun 2005 22:42:50 +0000 (22:42 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 20 Jun 2005 22:42:50 +0000 (22:42 +0000)
limit per PD based on intended usage.  AV limit for UD PDs is identical to that
of SQP PDs.

git-svn-id: svn://openib.tc.cornell.edu/gen1@19 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/al_pd.c
trunk/hw/mt23108/kernel/hca_verbs.c
trunk/inc/iba/ib_types.h
trunk/ulp/ipoib/kernel/ipoib_port.c

index 513e3c6eb7af925dab2c2058f9856abc0d4dacf6..08508712e73d32f66738cc0920a5a49c8b40755a 100644 (file)
@@ -123,6 +123,7 @@ alloc_pd(
 \r
        case IB_PDT_NORMAL:\r
        case IB_PDT_SQP:\r
+       case IB_PDT_UD:\r
                /* Allocate the protection domain. */\r
                status = verbs_allocate_pd(h_ca, h_pd);\r
                break;\r
index 4369a784acf3859a2c8f539e14ff94338e404dca..55326e8f947a42656f38c95316a9b7bcd92a72c6 100644 (file)
@@ -686,17 +686,27 @@ mlnx_allocate_pd (
                        goto cleanup;\r
                }\r
 \r
-               if( type == IB_PDT_SQP )\r
+               switch( type )\r
                {\r
-                       if (HH_OK != THHUL_pdm_alloc_pd_avs_prep(hobul_p->hhul_hndl, g_sqp_max_avs,\r
-                               PD_FOR_SQP, &hhul_pd_hndl, pd_ul_resources_p))\r
+               case IB_PDT_SQP:\r
+                       if (HH_OK != THHUL_pdm_alloc_pd_avs_prep(hobul_p->hhul_hndl,\r
+                               g_sqp_max_avs, PD_FOR_SQP, &hhul_pd_hndl, pd_ul_resources_p))\r
                        {\r
                                status = IB_ERROR;\r
                                goto cleanup;\r
                        }\r
-               }\r
-               else\r
-               {\r
+                       break;\r
+\r
+               case IB_PDT_UD:\r
+                       if (HH_OK != THHUL_pdm_alloc_pd_avs_prep(hobul_p->hhul_hndl,\r
+                               g_sqp_max_avs, PD_NO_FLAGS, &hhul_pd_hndl, pd_ul_resources_p))\r
+                       {\r
+                               status = IB_ERROR;\r
+                               goto cleanup;\r
+                       }\r
+                       break;\r
+\r
+               default:\r
                        if (HH_OK != THHUL_pdm_alloc_pd_prep(hobul_p->hhul_hndl, &hhul_pd_hndl, pd_ul_resources_p)) {\r
                                status = IB_ERROR;\r
                                goto cleanup;\r
index 254aa3eca360b7004fb147b9f9be8586449cc750..022e78a5ed2a904d6babb7c246f31fa0f2137958 100644 (file)
@@ -7821,7 +7821,8 @@ typedef enum _ib_pd_type
 {\r
        IB_PDT_NORMAL,\r
        IB_PDT_ALIAS,\r
-       IB_PDT_SQP\r
+       IB_PDT_SQP,\r
+       IB_PDT_UD\r
 \r
 }      ib_pd_type_t;\r
 /*\r
@@ -7834,6 +7835,9 @@ typedef enum _ib_pd_type
 *\r
 *      IB_PDT_SQP\r
 *              Protection domain for special queue pair usage.\r
+*\r
+*      IB_PDT_UD\r
+*              Protection domain for UD queue pair usage.\r
 *****/\r
 \r
 \r
index cbd5f9d7d405e03c7b03351ee3b30e575bfd0ca5..dce61f276fb35108139810bd084969e0441e7bf5 100644 (file)
@@ -755,7 +755,7 @@ __ib_mgr_init(
 \r
        /* Allocate the PD. */\r
        status = p_port->p_adapter->p_ifc->alloc_pd(\r
-               p_port->ib_mgr.h_ca, IB_PDT_NORMAL, p_port, &p_port->ib_mgr.h_pd );\r
+               p_port->ib_mgr.h_ca, IB_PDT_UD, p_port, &p_port->ib_mgr.h_pd );\r
        if( status != IB_SUCCESS )\r
        {\r
                IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,\r