On Wed, Jul 15, 2015 at 11:47:52AM +0300, Sagi Grimberg wrote:
> >  struct ib_pd *ib_alloc_pd(struct ib_device *device)
> >  {
> >     struct ib_pd *pd;
> >+    struct ib_device_attr devattr;
> >+    int rc;
> >+
> >+    rc = ib_query_device(device, &devattr);
> >+    if (rc)
> >+            return ERR_PTR(rc);
> 
> Unrelated question,
> Can we just cache the dev_attr in ib_device already? It's pretty
> obvious that each consumer that opens a device will automatically
> query its attributes...

Instead of caching it I'd suggest to kill ib_device_attr and move
the field into struct ib_device, similar to how all major kernel
subsystems work.  Otherwise fully agreed.

--
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

Reply via email to