On Mon, Sep 27, 2010 at 10:59:59AM -0700, Parav Pandit wrote:
> Hi,
>
> So as we know GIDs are based on IPv6 addresses, and GID table entries are
> updated on the fly when new IPv6 addresses are assigned to eth and vlan based
> eth interfaces.
The OFED stack supporting IBoE has always supported updating the GID
table caches through generating a LID_CHANGE event. That event is
caught by the ib core (cahche.c) causing it to update its caches.
Recently (OFED-1.5.2) I added a GID_CHANGE event to do just the same.
You can see ibv_asyncwatch for a usage example.
Here's the patch I used to add support at the core level:
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
index 6888356..660bff5 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -302,7 +302,8 @@ static void ib_cache_event(struct ib_event_handler *handler,
event->event == IB_EVENT_LID_CHANGE ||
event->event == IB_EVENT_PKEY_CHANGE ||
event->event == IB_EVENT_SM_CHANGE ||
- event->event == IB_EVENT_CLIENT_REREGISTER) {
+ event->event == IB_EVENT_CLIENT_REREGISTER ||
+ event->event == IB_EVENT_GID_CHANGE) {
work = kmalloc(sizeof *work, GFP_ATOMIC);
if (work) {
INIT_WORK(&work->work, ib_cache_task);
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 597878c..f5b054a 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -351,7 +351,8 @@ enum ib_event_type {
IB_EVENT_SRQ_ERR,
IB_EVENT_SRQ_LIMIT_REACHED,
IB_EVENT_QP_LAST_WQE_REACHED,
- IB_EVENT_CLIENT_REREGISTER
+ IB_EVENT_CLIENT_REREGISTER,
+ IB_EVENT_GID_CHANGE,
};
enum ib_event_flags {
>
> How does IB stack will get to know about new GIDs which are added into the
> table?
> So that query_gid() can be called with right index?
>
> Regards,
> Parav Pandit
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html