Add GID change event
authorOr Gerlitz <ogerlitz@mellanox.com>
Wed, 20 Jul 2011 19:38:58 +0000 (19:38 +0000)
committerRoland Dreier <roland@purestorage.com>
Tue, 26 Jul 2011 20:15:33 +0000 (13:15 -0700)
Add handling for GID change events, which are generated by the kernel
IBoE stack when the HW driver updates the GID table.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.co.il>
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
examples/asyncwatch.c
include/infiniband/verbs.h
man/ibv_get_async_event.3
src/enum_strs.c

index 5510a29..da7ebd4 100644 (file)
@@ -57,6 +57,8 @@ static const char *event_name_str(enum ibv_event_type event_type)
                return "IBV_EVENT_SM_CHANGE";
        case IBV_EVENT_CLIENT_REREGISTER:
                return "IBV_EVENT_CLIENT_REREGISTER";
+       case IBV_EVENT_GID_CHANGE:
+               return "IBV_EVENT_GID_CHANGE";
 
        case IBV_EVENT_CQ_ERR:
        case IBV_EVENT_QP_FATAL:
index 058d6fa..6acfc81 100644 (file)
@@ -209,7 +209,8 @@ enum ibv_event_type {
        IBV_EVENT_SRQ_ERR,
        IBV_EVENT_SRQ_LIMIT_REACHED,
        IBV_EVENT_QP_LAST_WQE_REACHED,
-       IBV_EVENT_CLIENT_REREGISTER
+       IBV_EVENT_CLIENT_REREGISTER,
+       IBV_EVENT_GID_CHANGE,
 };
 
 struct ibv_async_event {
index acb6257..a76dc0c 100644 (file)
@@ -81,6 +81,8 @@ following events:
 .B IBV_EVENT_SM_CHANGE \fR SM was changed on a port
 .TP
 .B IBV_EVENT_CLIENT_REREGISTER \fR SM sent a CLIENT_REREGISTER request to a port
+.TP
+.B IBV_EVENT_GID_CHANGE \fR GID table was changed on a port
 .PP
 .I CA events:
 .TP
index c57feaa..54d71a6 100644 (file)
@@ -85,9 +85,10 @@ const char *ibv_event_type_str(enum ibv_event_type event)
                [IBV_EVENT_SRQ_LIMIT_REACHED]   = "SRQ limit reached",
                [IBV_EVENT_QP_LAST_WQE_REACHED] = "last WQE reached",
                [IBV_EVENT_CLIENT_REREGISTER]   = "client reregistration",
+               [IBV_EVENT_GID_CHANGE]          = "GID table change"
        };
 
-       if (event < IBV_EVENT_CQ_ERR || event > IBV_EVENT_CLIENT_REREGISTER)
+       if (event < IBV_EVENT_CQ_ERR || event > IBV_EVENT_GID_CHANGE)
                return "unknown";
 
        return event_type_str[event];