[PATCH 3/7] libibverbs: add GID change event

Or Gerlitz
2011-07-19T09:30:08Z

Add IB GID change event which is generated by the kernel
IBoE stack when the HW driver updates the GID table.

Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
examples/asyncwatch.c | 2 ++
include/infiniband/verbs.h | 3 ++-
man/ibv_get_async_event.3 | 2 ++
3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/examples/asyncwatch.c b/examples/asyncwatch.c
index 5510a29..da7ebd4 100644
--- a/examples/asyncwatch.c
+++ b/examples/asyncwatch.c
@@ -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:
diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
index 17df3ff..0dd79f6 100644
--- a/include/infiniband/verbs.h
+++ b/include/infiniband/verbs.h
@@ -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 {
diff --git a/man/ibv_get_async_event.3 b/man/ibv_get_async_event.3
index acb6257..a76dc0c 100644
--- a/man/ibv_get_async_event.3
+++ b/man/ibv_get_async_event.3
@@ -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
--
1.5.5