On Mon, Dec 07, 2015 at 03:39:17PM -0600, Hefty, Sean wrote:
+struct rvt_mregion {
+       struct ib_pd *pd;       /* shares refcnt of ibmr.pd */
+       u64 user_base;          /* User's address for this region */
+       u64 iova;               /* IB start address of this region */
+       size_t length;
+       u32 lkey;
+       u32 offset;             /* offset (bytes) to start of region */
+       int access_flags;
+       u32 max_segs;           /* number of rvt_segs in all the arrays */
+       u32 mapsz;              /* size of the map array */
+       u8  page_shift;         /* 0 - non unform/non powerof2 sizes */
+       u8  lkey_published;     /* in global table */

Without looking ahead in the patch series, won't the access_flags indicate this?

I think it could. However to me this is more clear. When we allocate an lkey we set this, when it's freed we clear it, we check this flag in the free routine to decide if we should actually free it.

-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to