[ofa-general] [PATCH 1/4] Add IB UD extensions to v2 uDAPL package.

Arlin Davis arlin.r.davis at intel.com
Sun Jul 20 15:17:25 PDT 2008


New definitions for IB unreliable datagram extension

Extend EP dat_service_type, with DAT_IB_SERVICE_TYPE_UD
Add IB extension call dat_ib_post_send_ud().
Add address handle definition for UD calls.
Add IB event definitions to provide remote AH via connect and connect requests
Roll IB extension version to 2.0.2

Signed-off by: Arlin Davis ardavis at ichips.intel.com
---
 dat/include/dat2/dat.h               |    4 ++
 dat/include/dat2/dat_ib_extensions.h |   67 +++++++++++++++++++++++++++++++++-
 2 files changed, 69 insertions(+), 2 deletions(-)

diff --git a/dat/include/dat2/dat.h b/dat/include/dat2/dat.h
index d4e4cea..cf0b7ec 100755
--- a/dat/include/dat2/dat.h
+++ b/dat/include/dat2/dat.h
@@ -464,6 +464,10 @@ typedef DAT_UINT64 DAT_IA_ATTR_MASK;
 typedef enum dat_service_type
 {
     DAT_SERVICE_TYPE_RC		  /* reliable connections */
+#ifdef DAT_EXTENSIONS
+    ,DAT_SERVICE_TYPE_EXTENSION_BASE /* To be used by DAT extensions
+				   as a starting point of extension services */
+#endif /* DAT_EXTENSIONS */
 } DAT_SERVICE_TYPE;
 
 typedef struct dat_ep_attr
diff --git a/dat/include/dat2/dat_ib_extensions.h b/dat/include/dat2/dat_ib_extensions.h
index 0a9d3f5..27af51e 100755
--- a/dat/include/dat2/dat_ib_extensions.h
+++ b/dat/include/dat2/dat_ib_extensions.h
@@ -58,18 +58,24 @@
  *	DAT_NAMED_ATTR	name == extended operations and version, 
  *			version_value = version number of extension API
  */
-#define DAT_IB_EXTENSION_VERSION	201	/* 2.0.1 */
+#define DAT_IB_EXTENSION_VERSION	202	/* 2.0.2 */
 #define DAT_IB_ATTR_FETCH_AND_ADD	"DAT_IB_FETCH_AND_ADD"
 #define DAT_IB_ATTR_CMP_AND_SWAP	"DAT_IB_CMP_AND_SWAP"
 #define DAT_IB_ATTR_IMMED_DATA		"DAT_IB_IMMED_DATA"
+#define DAT_IB_ATTR_UD			"DAT_IB_UD"
 
 /* 
  * Definition for extended EVENT numbers, DAT_IB_EXTENSION_BASE_RANGE
  * is used by these extensions as a starting point for extended event numbers 
+ *
+ * DAT_IB_DTO_EVENT - All extended data transfers - req/recv evd
+ * DAT_IB_AH_EVENT - address handle resolution - connect evd
  */
 typedef enum dat_ib_event_number
 {
 	DAT_IB_DTO_EVENT = DAT_IB_EXTENSION_RANGE_BASE,
+	DAT_IB_UD_CONNECTION_REQUEST_EVENT,
+	DAT_IB_UD_CONNECTION_EVENT_ESTABLISHED
 
 } DAT_IB_EVENT_NUMBER;
 
@@ -81,6 +87,7 @@ typedef enum dat_ib_op
 	DAT_IB_FETCH_AND_ADD_OP,
 	DAT_IB_CMP_AND_SWAP_OP,
 	DAT_IB_RDMA_WRITE_IMMED_OP,
+	DAT_IB_UD_SEND_OP
 	
 } DAT_IB_OP;
 
@@ -98,6 +105,11 @@ typedef enum dat_ib_ext_type
 	DAT_IB_CMP_AND_SWAP,		// 1
 	DAT_IB_RDMA_WRITE_IMMED,	// 2
 	DAT_IB_RDMA_WRITE_IMMED_DATA,	// 3
+	DAT_IB_RECV_IMMED_DATA,		// 4
+	DAT_IB_UD_CONNECT_REQUEST,	// 5
+	DAT_IB_UD_REMOTE_AH,		// 6
+	DAT_IB_UD_SEND,			// 7
+	DAT_IB_UD_RECV			// 8
 
 } DAT_IB_EXT_TYPE;
 
@@ -133,6 +145,10 @@ typedef enum dat_ib_dtos
 	DAT_IB_DTO_RECV_IMMED,
 	DAT_IB_DTO_FETCH_ADD,
 	DAT_IB_DTO_CMP_SWAP,
+	DAT_IB_DTO_RECV_MSG_IMMED,
+	DAT_IB_DTO_SEND_UD,
+	DAT_IB_DTO_RECV_UD,
+	DAT_IB_DTO_RECV_UD_IMMED,	
 
 } DAT_IB_DTOS;
 
@@ -155,7 +171,7 @@ typedef enum dat_ib_handle_type
  */
 typedef enum dat_ib_evd_extension_flags
 {
-	DAT_IB_EVD_EXTENSION_FLAG = DAT_EVD_EXTENSION_BASE
+	DAT_IB_EVD_EXTENSION_FLAG = DAT_EVD_EXTENSION_BASE,
 
 } DAT_IB_EVD_EXTENSION_FLAGS;
 
@@ -170,6 +186,16 @@ typedef enum dat_ib_mem_priv_flags
 	
 } DAT_IB_MEM_PRIV_FLAGS;
 
+/* 
+ * Definition for IB address handle, unreliable datagram.
+ */
+typedef struct dat_ib_addr_handle
+{
+    struct ibv_ah	*ah;
+    DAT_UINT32	        qpn;
+    DAT_SOCK_ADDR6	ia_addr;
+   
+} DAT_IB_ADDR_HANDLE;
 
 /* 
  * Definitions for extended event data:
@@ -194,6 +220,9 @@ typedef struct dat_ib_immed_data
  *	specifies extension data values. 
  * NOTE: DAT_EXTENSION_EVENT_DATA cannot exceed 64 bytes as defined by 
  *	 "DAT_UINT64 extension_data[8]" in DAT_EVENT (dat.h)
+ *
+ *  Provide UD address handles via extended connect establishment. 
+ *  ia_addr provided with extended conn events for reference.
  */
 typedef struct dat_ib_extension_event_data
 {
@@ -202,9 +231,22 @@ typedef struct dat_ib_extension_event_data
     union {
 		DAT_IB_IMMED_DATA	immed;
     } val;
+    DAT_IB_ADDR_HANDLE	remote_ah; 
 
 } DAT_IB_EXTENSION_EVENT_DATA;
 
+/* 
+ * Definitions for additional extension handle types beyond 
+ * standard DAT handle. New Bit definitions MUST start at 
+ * DAT_HANDLE_TYPE_EXTENSION_BASE
+ */
+typedef enum dat_ib_service_type
+{
+    DAT_IB_SERVICE_TYPE_UD   = DAT_SERVICE_TYPE_EXTENSION_BASE,
+
+} DAT_IB_SERVICE_TYPE;
+
+
 /* Extended RETURN and EVENT STATUS string helper functions */
 
 /* DAT_EXT_RETURN error to string */
@@ -306,5 +348,26 @@ dat_strerror_ext_status (
 				(idata), \
 				(flgs))
 
+/* 
+ * Unreliable datagram: msg send 
+ *
+ * This asynchronous call is modeled after the InfiniBand UD message send
+ * Event completion for the request completes as an 
+ * DAT_EXTENSION with extension type set to DAT_DTO_EXTENSION_UD_SEND.
+ * Event completion on the remote endpoint completes as receive DTO operation
+ * type of DAT_EXTENSION with operation set to DAT_DTO_EXTENSION_UD_RECV.
+ *
+ * Other extension flags:
+ *	n/a
+ */
+#define dat_ib_post_send_ud(ep, segments, lbuf, ah_ptr, cookie, flgs) \
+	     dat_extension_op(  ep, \
+				DAT_IB_UD_SEND_OP, \
+				(segments), \
+				(lbuf), \
+				(ah_ptr), \
+				(cookie), \
+				(flgs))
+
 #endif /* _DAT_IB_EXTENSIONS_H_ */
 
-- 
1.5.2.5






More information about the general mailing list