On 4/15/2017 10:53 AM, Leon Romanovsky wrote:
ppd->pkeys[default_pkey_idx] = DEFAULT_P_KEY;
+ ppd->part_enforce |= HFI1_PART_ENFORCE_IN;
+ ppd->part_enforce |= HFI1_PART_ENFORCE_OUT;
+
Isn't better just remove these enforcement checks if it always should be performed?
➜ linux-rdma git:(rdma-next) git grep part_enforce drivers/infiniband/
drivers/infiniband/hw/hfi1/hfi.h: u8 part_enforce; /* partition enforcement flags */
drivers/infiniband/hw/hfi1/hfi.h: if (!(ppd->part_enforce & HFI1_PART_ENFORCE_IN))
drivers/infiniband/hw/hfi1/hfi.h: if (!(ppd->part_enforce & HFI1_PART_ENFORCE_IN))
drivers/infiniband/hw/hfi1/mad.c: if (ppd->part_enforce & HFI1_PART_ENFORCE_IN)
drivers/infiniband/hw/hfi1/mad.c: if (ppd->part_enforce & HFI1_PART_ENFORCE_OUT)
drivers/infiniband/hw/hfi1/mad.c: ppd->part_enforce |= HFI1_PART_ENFORCE_IN;
drivers/infiniband/hw/hfi1/mad.c: ppd->part_enforce &= ~HFI1_PART_ENFORCE_IN;
drivers/infiniband/hw/hfi1/mad.c: ppd->part_enforce |= HFI1_PART_ENFORCE_OUT;
drivers/infiniband/hw/hfi1/mad.c: ppd->part_enforce &= ~HFI1_PART_ENFORCE_OUT;
drivers/infiniband/hw/hfi1/verbs.c: if (!(ppd->part_enforce & HFI1_PART_ENFORCE_OUT))
I agree with you, but I have asked Neel to do a bit of due diligence and
make sure this is indeed what we actually want to do. Thanks for
pointing this out.
-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html