[ofa-general] ibv_reg_mr errno return codes?
Troy Benjegerdes
troy at scl.ameslab.gov
Tue Mar 6 08:27:09 PST 2007
I made the following change to infiniband/hw/ehca/ehca_mrmw.c to have
ibv_reg_mr return -ENOMEM instead of -EINVAL.. shouldn't we define
and document what errno codes ibv_reg_mr is expected to return so
that applications have some idea if there is a permanent failure and
they need to exit, or go back and unregister some locked memory?
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/
infiniband/hw/ehca/ehca_
index cfb362a..58073f0 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -2047,13 +2047,14 @@ int ehca_mrmw_map_hrc_alloc(const u64 hipz_rc)
return 0;
case H_ADAPTER_PARM: /* invalid adapter handle */
case H_RT_PARM: /* invalid resource type */
- case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */
case H_MLENGTH_PARM: /* invalid memory length */
case H_MEM_ACCESS_PARM: /* invalid access controls */
case H_CONSTRAINED: /* resource constraint */
return -EINVAL;
case H_BUSY: /* long busy */
return -EBUSY;
+ case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */
+ return -ENOMEM;
default:
return -EINVAL;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20070306/51255151/attachment.html>
More information about the general
mailing list