Or> Just to make sure, would the __be64 node_guid field of struct Or> ib_device have the exact semantics of the __be64 node_guid Or> field of struct ib_device_attr ? iser uses it from the attr Or> struct and we can sure move to use it from the device struct.
Yes, that's right. Something like the patch below (compile tested only) is what is required. - R. --- Move iSER from getting node_guid via ib_query_device() to using the node_guid field in struct ib_device, since ib_query_device() will stop returning the node_guid soon. Signed-off-by: Roland Dreier <[EMAIL PROTECTED]> --- infiniband/ulp/iser/iser_verbs.c (revision 4866) +++ infiniband/ulp/iser/iser_verbs.c (working copy) @@ -1,6 +1,6 @@ /* * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved. - * Copyright (c) 2005 Cisco Systems. All rights reserved. + * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -73,8 +73,6 @@ int iser_create_adaptor_ib_res(struct is struct ib_device *device = p_iser_adaptor->device; struct ib_fmr_pool_param params; - ib_query_device(device, &(p_iser_adaptor->device_attr)); - strcpy(p_iser_adaptor->name, device->name); iser_dbg("setting device name %s as adatptor name\n", device->name); @@ -234,23 +232,16 @@ int iser_free_qp_and_id(struct iser_conn struct iser_adaptor *iser_adaptor_find_by_device(struct rdma_cm_id *cma_id) { - struct ib_device_attr *p_device_attr = NULL; struct list_head *p_list; struct iser_adaptor *p_adaptor = NULL; - p_device_attr = kmalloc(sizeof *p_device_attr, GFP_KERNEL); - if(p_device_attr == NULL) - goto end; - - ib_query_device(cma_id->device, p_device_attr); - spin_lock(&ig.adaptor_list_lock); p_list = ig.adaptor_list.next; while (p_list != &ig.adaptor_list) { p_adaptor = list_entry(p_list, struct iser_adaptor, ig_list); /* find if there's a match using the device GUID */ - if (p_adaptor->device_attr.node_guid == p_device_attr->node_guid) + if (p_adaptor->device->node_guid == cma_id->device->node_guid) break; } @@ -268,7 +259,6 @@ struct iser_adaptor *iser_adaptor_find_b } end: spin_unlock(&ig.adaptor_list_lock); - kfree(p_device_attr); return p_adaptor; } --- infiniband/ulp/iser/iser.h (revision 4866) +++ infiniband/ulp/iser/iser.h (working copy) @@ -1,6 +1,6 @@ /* * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved. - * Copyright (c) 2005 Cisco Systems. All rights reserved. + * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -105,7 +105,6 @@ struct iser_adaptor { struct list_head ig_list; /* entry in ig adaptors list */ struct ib_device *device; - struct ib_device_attr device_attr; struct ib_pd *pd; struct ib_cq *cq; _______________________________________________ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general