Re: [PATCH 15/20] IB/hfi1: Permanently enable P_Key checking in HFI

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

 



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



[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