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;
        }
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to