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/trunk@19 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

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

index 513e3c6..0850871 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 4369a78..55326e8 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 254aa3e..022e78a 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 cbd5f9d..dce61f2 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