Re: [PATCH 03/17] RDMA/core: Introduce IB_MR_TYPE_PI and ib_alloc_mr_integrity API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -1982,6 +1982,9 @@ struct ib_mr *ib_alloc_mr(struct ib_pd *pd,
>  	if (!pd->device->ops.alloc_mr)
>  		return ERR_PTR(-EOPNOTSUPP);
>  
> +	if (WARN_ON_ONCE(mr_type == IB_MR_TYPE_PI))
> +		return ERR_PTR(-EINVAL);
> +

So why is IB_MR_TYPE_PI a separate function, but IB_MR_TYPE_SG_GAPS
is not?

I think we either want one alloc/free helper per type, or we have
to extend ib_alloc_mr with an arguments structure or something similar.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux