Roland,

This is just an RFC patch (untested).  

I'm adding bypass support to a device and have a need to know whenever
an async event is delivered to the consumer.  It allows the bypass
library to do WQ or CQ processing that needs to happen when a fatal
async event happens.  This async callback is similar to the cq_event
callback that already exists in libibverbs.  

If you think this is reasonable, then I'll submit a tested patch.  

Steve.




Index: include/infiniband/verbs.h
===================================================================
--- include/infiniband/verbs.h  (revision 9349)
+++ include/infiniband/verbs.h  (working copy)
@@ -631,6 +631,7 @@
                                                uint16_t lid);
        int                     (*detach_mcast)(struct ibv_qp *qp, union 
ibv_gid *gid,
                                                uint16_t lid);
+       void                    (*async_event)(struct ibv_async_event *event);
 };

 struct ibv_context {
Index: src/device.c
===================================================================
--- src/device.c        (revision 9349)
+++ src/device.c        (working copy)
@@ -214,6 +214,9 @@
                break;
        }

+       if (context->ops.async_event)
+               context->ops.async_event(event);
+
        return 0;
 }



_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to