]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[ipoib cm] Get send descriptors from preallocated pool. Update. added missing file.
authoraestrin <aestrin@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 26 Jan 2009 18:45:57 +0000 (18:45 +0000)
committeraestrin <aestrin@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 26 Jan 2009 18:45:57 +0000 (18:45 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@1885 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/ipoib_cm/kernel/ipoib_port.h

index b439cf11a1ae30d12243abdcd0ccd683adeb08a2..38480bf52c576a1c68409ba0eb19f8dc212db721 100644 (file)
@@ -72,7 +72,7 @@
 #define IPOIB_RECV_FROM_PACKET( P )    \\r
        (((void **)P->MiniportReservedEx)[1])\r
 #define IPOIB_SEND_FROM_PACKET( P )            \\r
-       (((send_buf_t**)P->MiniportReservedEx)[2])\r
+       (((void **)P->MiniportReservedEx)[2])\r
 #define IPOIB_PACKET_FROM_LIST_ITEM( I ) \\r
        (PARENT_STRUCT( I, NDIS_PACKET, MiniportReservedEx ))\r
 #define IPOIB_LIST_ITEM_FROM_PACKET( P ) \\r
@@ -401,6 +401,7 @@ typedef enum __send_dir
 \r
 typedef struct _ipoib_send_desc\r
 {\r
+       cl_pool_item_t          pool_item;\r
        NDIS_PACKET                     *p_pkt;\r
        ipoib_endpt_t           *p_endpt;\r
        send_buf_t                      *p_buf;\r
@@ -469,6 +470,9 @@ typedef struct _ipoib_send_mgr
 {\r
        atomic32_t              depth;\r
        cl_qlist_t              pending_list;\r
+       cl_spinlock_t   desc_lock;\r
+       cl_qpool_t              desc_pool;\r
+\r
 \r
 }      ipoib_send_mgr_t;\r
 /*\r
@@ -792,4 +796,19 @@ __port_attr_to_mtu_size(uint32_t value)
                return  256;\r
        }\r
 }\r
+\r
+inline ipoib_send_desc_t*\r
+ipoib_send_desc_mgr_get(\r
+       IN              ipoib_port_t* const                     p_port );\r
+\r
+void\r
+ipoib_send_desc_mgr_put(\r
+       IN              ipoib_port_t* const                     p_port,\r
+       IN              ipoib_send_desc_t* const        p_desc );\r
+\r
+void\r
+ipoib_send_desc_mgr_put_list(\r
+       IN              ipoib_port_t* const                     p_port,\r
+       IN              cl_qlist_t* const                       p_list );\r
+\r
 #endif /* _IPOIB_PORT_H_ */\r