IB/rdmavt: Add driver notification for new AH
Drivers may need to do some work once an address handle has been created. Add a driver function for this purpose. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Harish Chegondi <harish.chegondi@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
f3d01bbcdc
commit
b036db83c0
@@ -83,8 +83,8 @@ int rvt_check_ah(struct ib_device *ibdev,
|
||||
!(ah_attr->ah_flags & IB_AH_GRH))
|
||||
return -EINVAL;
|
||||
}
|
||||
if (rdi->driver_f.check_ah(ibdev, ah_attr))
|
||||
return -EINVAL;
|
||||
if (rdi->driver_f.check_ah)
|
||||
return rdi->driver_f.check_ah(ibdev, ah_attr);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(rvt_check_ah);
|
||||
@@ -123,6 +123,9 @@ struct ib_ah *rvt_create_ah(struct ib_pd *pd,
|
||||
ah->attr = *ah_attr;
|
||||
atomic_set(&ah->refcount, 0);
|
||||
|
||||
if (dev->driver_f.notify_new_ah)
|
||||
dev->driver_f.notify_new_ah(pd->device, ah_attr, ah);
|
||||
|
||||
return &ah->ibah;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user