[ofw] [PATCH] core: add new async events
Sean Hefty
sean.hefty at intel.com
Mon May 11 14:43:41 PDT 2009
Define additional async event types for GID, LID, PKey, and SM
changes. These are reported by winverbs, and at least appear to
be handled by the HCA drivers.
This avoids converting LID change events seen by the mlx4 driver
into local fatal errors.
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
diff -up -r -X \mshefty\scm\winof\trunk\docs\dontdiff.txt -I '\$Id:' trunk\inc\iba/ib_types.h branches\winverbs\inc\iba/ib_types.h
--- trunk\inc\iba/ib_types.h 2009-05-05 23:05:51.060250000 -0700
+++ branches\winverbs\inc\iba/ib_types.h 2009-05-11 11:49:23.501995000 -0700
@@ -8407,6 +8410,10 @@ typedef enum _ib_async_event_t
IB_AE_RESET_CLIENT,
IB_AE_RESET_END,
IB_AE_RESET_FAILED,
+ IB_AE_GID_CHANGE,
+ IB_AE_LID_CHANGE,
+ IB_AE_PKEY_CHANGE,
+ IB_AE_SM_CHANGE,
IB_AE_UNKNOWN /* ALWAYS LAST ENUM VALUE */
} ib_async_event_t;
diff -up -r -X \mshefty\scm\winof\trunk\docs\dontdiff.txt -I '\$Id:' trunk\hw/mlx4/kernel/bus/inc/ib_verbs.h
branches\winverbs\hw/mlx4/kernel/bus/inc/ib_verbs.h
--- trunk\hw/mlx4/kernel/bus/inc/ib_verbs.h 2009-03-11 15:19:47.792375000 -0700
+++ branches\winverbs\hw/mlx4/kernel/bus/inc/ib_verbs.h 2009-05-11 11:44:56.251995000 -0700
@@ -274,10 +274,10 @@ enum ib_event_type {
IB_EVENT_RESET_CLIENT = IB_AE_RESET_CLIENT, // device will be reset upon client request
IB_EVENT_RESET_END = IB_AE_RESET_END, // device has been reset
IB_EVENT_RESET_FAILED = IB_AE_RESET_FAILED, // device has been reset
- IB_EVENT_LID_CHANGE = IB_AE_UNKNOWN + 1,
- IB_EVENT_PKEY_CHANGE,
- IB_EVENT_SM_CHANGE,
- IB_EVENT_CLIENT_REREGISTER
+ IB_EVENT_LID_CHANGE = IB_AE_LID_CHANGE,
+ IB_EVENT_PKEY_CHANGE = IB_AE_PKEY_CHANGE,
+ IB_EVENT_SM_CHANGE = IB_AE_SM_CHANGE,
+ IB_EVENT_CLIENT_REREGISTER = IB_AE_CLIENT_REREGISTER
};
struct ib_event {
diff -up -r -X \mshefty\scm\winof\trunk\docs\dontdiff.txt -I '\$Id:' trunk\hw/mthca/kernel/ib_verbs.h
branches\winverbs\hw/mthca/kernel/ib_verbs.h
--- trunk\hw/mthca/kernel/ib_verbs.h 2008-10-29 11:24:08.234375000 -0700
+++ branches\winverbs\hw/mthca/kernel/ib_verbs.h 2009-05-11 11:46:08.017620000 -0700
@@ -251,9 +251,10 @@ enum ib_event_type {
IB_EVENT_SRQ_LIMIT_REACHED = IB_AE_SRQ_LIMIT_REACHED,
IB_EVENT_SRQ_CATAS_ERROR = IB_AE_SRQ_CATAS_ERROR,
IB_EVENT_SRQ_QP_LAST_WQE_REACHED = IB_AE_SRQ_QP_LAST_WQE_REACHED,
- IB_EVENT_LID_CHANGE = IB_AE_UNKNOWN + 1,
- IB_EVENT_PKEY_CHANGE,
- IB_EVENT_SM_CHANGE
+ IB_EVENT_LID_CHANGE = IB_AE_LID_CHANGE,
+ IB_EVENT_PKEY_CHANGE = IB_AE_PKEY_CHANGE,
+ IB_EVENT_SM_CHANGE = IB_AE_SM_CHANGE,
+ IB_EVENT_CLIENT_REREGISTER = IB_AE_CLIENT_REREGISTER
};
struct ib_event {
diff -up -r -X \mshefty\scm\winof\trunk\docs\dontdiff.txt -I '\$Id:' trunk\core\winverbs/kernel/wv_device.c
branches\winverbs\core\winverbs/kernel/wv_device.c
--- trunk\core\winverbs/kernel/wv_device.c 2008-07-23 14:54:41.418124600 -0700
+++ branches\winverbs\core\winverbs/kernel/wv_device.c 2009-05-11 11:51:46.642620000 -0700
@@ -77,8 +77,14 @@ static UINT32 WvDeviceConvertEvent(ib_as
case IB_AE_PORT_DOWN:
return WV_IO_EVENT_STATE;
case IB_AE_CLIENT_REREGISTER:
+ case IB_AE_SM_CHANGE:
return WV_IO_EVENT_MANAGEMENT;
- // TODO: report LID / GID / SM / PKey changes
+ case IB_AE_GID_CHANGE:
+ return WV_IO_EVENT_ADDRESS;
+ case IB_AE_LID_CHANGE:
+ return WV_IO_EVENT_LINK_ADDRESS;
+ case IB_AE_PKEY_CHANGE:
+ return WV_IO_EVENT_PARTITION;
default:
return 0;
}
More information about the ofw
mailing list