Set the private_data_len for reported events.  This allows
DAPL to use the value when copying private data.

Signed-off-by: Sean Hefty <[email protected]>
---
This should go into 2.2.

 trunk/ulp/librdmacm/include/rdma/rdma_cma.h |    2 ++
 trunk/ulp/librdmacm/src/cma.cpp             |    4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/trunk/ulp/librdmacm/include/rdma/rdma_cma.h 
b/trunk/ulp/librdmacm/include/rdma/rdma_cma.h
index c3b9ad1..7b9a6e0 100644
--- a/trunk/ulp/librdmacm/include/rdma/rdma_cma.h
+++ b/trunk/ulp/librdmacm/include/rdma/rdma_cma.h
@@ -44,6 +44,8 @@ extern "C" {
  * Interfaces based on librdmacm 1.0.8.
  */
 
+#define RDMA_MAX_PRIVATE_DATA  56
+
 /*
  * Upon receiving a device removal event, users must destroy the associated
  * RDMA identifier and release all resources allocated with the device.
diff --git a/trunk/ulp/librdmacm/src/cma.cpp b/trunk/ulp/librdmacm/src/cma.cpp
index 2727d88..cde309b 100644
--- a/trunk/ulp/librdmacm/src/cma.cpp
+++ b/trunk/ulp/librdmacm/src/cma.cpp
@@ -84,7 +84,7 @@ struct cma_device
 
 struct cma_event {
        struct rdma_cm_event    event;
-       uint8_t                                 private_data[56];
+       uint8_t                                 
private_data[RDMA_MAX_PRIVATE_DATA];
        struct cma_id_private   *id_priv;
 };
 
@@ -1029,6 +1029,8 @@ int rdma_get_cm_event(struct rdma_event_channel *channel,
                evt->id_priv = CONTAINING_RECORD(id, struct cma_id_private, id);
                evt->event.id = id;
                evt->event.param.conn.private_data = evt->private_data;
+               evt->event.param.conn.private_data_len = RDMA_MAX_PRIVATE_DATA;
+
                evt->event.status = id->ep.connect->
                                                        
GetOverlappedResult(&entry->Overlap, &bytes, FALSE);
 


_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to