]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IBAL] Change CEP DREP API
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 13 Jul 2008 08:52:24 +0000 (08:52 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 13 Jul 2008 08:52:24 +0000 (08:52 +0000)
The al_cep_drep API currently takes the ib_cm_drep_t structure.  This structure is passed in the IOCTL.  It has en embedded pointer that isn't used since the private data is copied into the IOCTL structure.

This patch removes the ib_cm_drep_t structure from the IOCTL structure, and passes the private data buffer and length in explicitly.

Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1374 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/al_cm_cep.h
trunk/core/al/al_cm_qp.c
trunk/core/al/al_dev.h
trunk/core/al/kernel/al_cm_cep.c
trunk/core/al/kernel/al_proxy_cep.c
trunk/core/al/user/ual_cm_cep.c
trunk/inc/iba/ib_al_ioctl.h

index 10659b925a5e1a82832ea1915455d8b1b6d540db..b4aad3fa4a18119cb08dbed62877d5b572a91603 100644 (file)
@@ -238,7 +238,8 @@ ib_api_status_t
 al_cep_drep(\r
        IN                              ib_al_handle_t                          h_al,\r
        IN                              net32_t                                         cid,\r
-       IN              const   ib_cm_drep_t* const                     p_cm_drep );\r
+       IN              const   uint8_t* const                          p_pdata OPTIONAL,\r
+       IN              const   uint8_t                                         pdata_len );\r
 \r
 \r
 ib_api_status_t\r
index 0966cb163521aadb47087ce37bea154868ffb01d..ae75442922bb6d3e7d7d70227fcb3782d19ab247 100644 (file)
@@ -386,7 +386,7 @@ __proc_dconn_timeout(
 \r
 static void\r
 __proc_failed_send(\r
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp,\r
+       IN                              ib_qp_handle_t                          h_qp,\r
        IN              const   ib_mad_t* const                         p_mad )\r
 {\r
        AL_ENTER( AL_DBG_CM );\r
@@ -1621,7 +1621,8 @@ ib_cm_drep(
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
-       status = al_cep_drep( h_cm_dreq.h_al, h_cm_dreq.cid, p_cm_drep );\r
+       status = al_cep_drep( h_cm_dreq.h_al, h_cm_dreq.cid,\r
+               p_cm_drep->p_drep_pdata, p_cm_drep->drep_length );\r
        switch( status )\r
        {\r
        case IB_INVALID_SETTING:\r
index 8c8cb02fb7336a2e46428e3e62c65eee32d86b2d..1b9c9c8de93ddee8d4666a3abf4f5e33c53abfe7 100644 (file)
@@ -55,7 +55,7 @@
 #define AL_DEVICE_NAME L"\\Device\\ibal"\r
 #define        ALDEV_KEY               (0x3B)  /* Matches FILE_DEVICE_INFINIBAND from wdm.h */\r
 \r
-#define AL_IOCTL_VERSION                       (8)\r
+#define AL_IOCTL_VERSION                       (9)\r
 \r
 /* max number of devices with non-default pkey */\r
 #define        MAX_NUM_PKEY    16\r
index 6962bd76dbc5ef906478cd0a6c1cead484432ee1..d5cc4e2966f8aad091442fc58d4c8a767d936dc5 100644 (file)
@@ -3393,6 +3393,7 @@ __complete_ndi_irp(
        ib_put_mad( p_mad );\r
 }\r
 \r
+\r
 /* Called with the CEP and CEP manager locks held */\r
 static ib_api_status_t\r
 __cep_queue_mad(\r
@@ -5827,7 +5828,8 @@ ib_api_status_t
 al_cep_drep(\r
        IN                              ib_al_handle_t                          h_al,\r
        IN                              net32_t                                         cid,\r
-       IN              const   ib_cm_drep_t* const                     p_cm_drep )\r
+       IN              const   uint8_t* const                          p_pdata OPTIONAL,\r
+       IN              const   uint8_t                                         pdata_len )\r
 {\r
        ib_api_status_t         status;\r
        kcep_t                          *p_cep;\r
@@ -5855,8 +5857,8 @@ al_cep_drep(
                if( status != IB_SUCCESS )\r
                        break;\r
 \r
-               status = __format_drep( p_cep, p_cm_drep->p_drep_pdata,\r
-                       p_cm_drep->drep_length, (mad_cm_drep_t*)p_mad->p_mad_buf );\r
+               status = __format_drep( p_cep, p_pdata,\r
+                       pdata_len, (mad_cm_drep_t*)p_mad->p_mad_buf );\r
                if( status != IB_SUCCESS )\r
                        break;\r
 \r
index 7691438d1a9863b93a7b3d0c8cbb1e30458db349..8afbf3062c32b060774ce9d4f48760e194fc26ef 100644 (file)
@@ -718,10 +718,8 @@ proxy_cep_drep(
                return CL_INVALID_PARAMETER;\r
        }\r
 \r
-       p_ioctl->cm_drep.p_drep_pdata = p_ioctl->pdata;\r
-\r
        (*(ib_api_status_t*)cl_ioctl_out_buf( h_ioctl )) = al_cep_drep(\r
-               p_context->h_al, p_ioctl->cid, &p_ioctl->cm_drep );\r
+               p_context->h_al, p_ioctl->cid, p_ioctl->pdata, p_ioctl->pdata_len );\r
 \r
        *p_ret_bytes = sizeof(ib_api_status_t);\r
 \r
index dc4cd02d03b8fabebf5f4e947ab584552dcaa859..e404fff28899bf4ff9ae84299ec27c562d4ca966 100644 (file)
@@ -1196,7 +1196,8 @@ ib_api_status_t
 al_cep_drep(\r
        IN                              ib_al_handle_t                          h_al,\r
        IN                              net32_t                                         cid,\r
-       IN              const   ib_cm_drep_t* const                     p_cm_drep )\r
+       IN              const   uint8_t* const                          p_pdata OPTIONAL,\r
+       IN              const   uint8_t                                         pdata_len )\r
 {\r
        ib_api_status_t                 status;\r
        ual_cep_drep_ioctl_t    ioctl;\r
@@ -1210,26 +1211,23 @@ al_cep_drep(
                return IB_INVALID_HANDLE;\r
        }\r
 \r
-       if( !p_cm_drep )\r
-       {\r
-               AL_EXIT( AL_DBG_CM );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-    cl_memclr(&ioctl, sizeof(ioctl));\r
        ioctl.cid = cid;\r
-       ioctl.cm_drep = *p_cm_drep;\r
        /* Copy private data, if any. */\r
-       if( p_cm_drep->p_drep_pdata )\r
+       if( p_pdata )\r
        {\r
-               if( p_cm_drep->drep_length > IB_DREP_PDATA_SIZE )\r
+               if( pdata_len > IB_DREP_PDATA_SIZE )\r
                {\r
                        AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
                                ("private data larger than DREP private data.\n") );\r
                        return IB_INVALID_SETTING;\r
                }\r
 \r
-               cl_memcpy(\r
-                       ioctl.pdata, p_cm_drep->p_drep_pdata, p_cm_drep->drep_length );\r
+               cl_memcpy( ioctl.pdata, p_pdata, pdata_len );\r
+               ioctl.pdata_len = pdata_len;\r
+       }\r
+       else\r
+       {\r
+               ioctl.pdata_len = 0;\r
        }\r
 \r
        if( !DeviceIoControl( g_al_device, UAL_CEP_DREP, &ioctl,\r
index 2e4d0c9a92e41ccc134cfcd44fa8cf5b195ab13f..b8f046b5a20b690fa8697b7fb34aa5f03ecaca12 100644 (file)
@@ -3030,7 +3030,7 @@ typedef struct _ual_cep_dreq_ioctl
 typedef struct _ual_cep_drep_ioctl\r
 {\r
        net32_t                                         cid;\r
-       ib_cm_drep_t                            cm_drep;\r
+       uint8_t                                         pdata_len;\r
        uint8_t                                         pdata[IB_DREP_PDATA_SIZE];\r
 \r
 }      ual_cep_drep_ioctl_t;\r