Re: [PATCH 6/9] IB/core: add a need_inval flag to struct ib_mr

Bart Van Assche
2016-02-29T22:40:44Z

On 02/29/2016 02:20 PM, Christoph Hellwig wrote:
> From: Steve Wise <swise@chelsio.com>
>
> This is the first step toward moving MR invalidation decisions
> to the core. It will be needed by the upcoming RW API.
>
> Signed-off-by: Steve Wise <swise@opengridcomputing.com>
> ---
> include/rdma/ib_verbs.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 1e68dae..2b94cea 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -1431,6 +1431,7 @@ struct ib_mr {
> u64 iova;
> u32 length;
> unsigned int page_size;
> + bool need_inval;
> union {
> struct ib_uobject *uobject; /* user */
> struct list_head qp_entry; /* FR */

Hi Christoph,

mthca uses kmalloc() to allocate a struct mr. Are you sure we don't need
to initialize the 'need_inval' member in ib_alloc_mr()?

Bart.