Message ID | 20230606055005.80729-1-chengyou@linux.alibaba.com (mailing list archive) |
---|---|
Headers | show |
Series | RDMA/erdma: Add a new doorbell allocation mechanism | expand |
On Tue, Jun 06, 2023 at 01:50:01PM +0800, Cheng Xu wrote: > Hi, > > This series adds a new doorbell allocation mechanism to meet the > the isolation requirement for userspace applications. Two main change > points in this patch set: One is that we extend the bar space for doorbell > allocation, and the other one is that we associate QPs/CQs with the > allocated doorbells for authorization. We also keep the original doorbell > mechanism for compatibility, but only used under CAP_SYS_RAWIO to prevent > non-privileged access, which suggested by Jason before. > > - #1 configures the current PAGE_SIZE to hardware, so that hardware can > organize the mmio space properly. > - #2~#3 implement the new doorbell allocation mechanism. > - #4 refactors the doorbell allocation part to make code more simpler and > cleaner. > > Thanks, > Cheng Xu > > Cheng Xu (4): > RDMA/erdma: Configure PAGE_SIZE to hardware > RDMA/erdma: Allocate doorbell resources from hardware > RDMA/erdma: Associate QPs/CQs with doorbells for authorization > RDMA/erdma: Refactor the original doorbell allocation mechanism As a side note, there is no need to perform double not (!!...) when assigning to bool variables. Thanks > > drivers/infiniband/hw/erdma/erdma.h | 16 +- > drivers/infiniband/hw/erdma/erdma_hw.h | 64 ++++++-- > drivers/infiniband/hw/erdma/erdma_main.c | 53 +++---- > drivers/infiniband/hw/erdma/erdma_verbs.c | 178 +++++++++++++--------- > drivers/infiniband/hw/erdma/erdma_verbs.h | 13 +- > 5 files changed, 183 insertions(+), 141 deletions(-) > > -- > 2.31.1 >
On Tue, 06 Jun 2023 13:50:01 +0800, Cheng Xu wrote: > This series adds a new doorbell allocation mechanism to meet the > the isolation requirement for userspace applications. Two main change > points in this patch set: One is that we extend the bar space for doorbell > allocation, and the other one is that we associate QPs/CQs with the > allocated doorbells for authorization. We also keep the original doorbell > mechanism for compatibility, but only used under CAP_SYS_RAWIO to prevent > non-privileged access, which suggested by Jason before. > > [...] Applied, thanks! [1/4] RDMA/erdma: Configure PAGE_SIZE to hardware https://git.kernel.org/rdma/rdma/c/128f8404306d42 [2/4] RDMA/erdma: Allocate doorbell resources from hardware https://git.kernel.org/rdma/rdma/c/7e9a1dada2266c [3/4] RDMA/erdma: Associate QPs/CQs with doorbells for authorization https://git.kernel.org/rdma/rdma/c/6534de1fe38514 [4/4] RDMA/erdma: Refactor the original doorbell allocation mechanism https://git.kernel.org/rdma/rdma/c/3b3dfd58bace12 Best regards,
On 6/11/23 5:19 PM, Leon Romanovsky wrote: > On Tue, Jun 06, 2023 at 01:50:01PM +0800, Cheng Xu wrote: >> Hi, >> >> This series adds a new doorbell allocation mechanism to meet the >> the isolation requirement for userspace applications. Two main change >> points in this patch set: One is that we extend the bar space for doorbell >> allocation, and the other one is that we associate QPs/CQs with the >> allocated doorbells for authorization. We also keep the original doorbell >> mechanism for compatibility, but only used under CAP_SYS_RAWIO to prevent >> non-privileged access, which suggested by Jason before. >> >> - #1 configures the current PAGE_SIZE to hardware, so that hardware can >> organize the mmio space properly. >> - #2~#3 implement the new doorbell allocation mechanism. >> - #4 refactors the doorbell allocation part to make code more simpler and >> cleaner. >> >> Thanks, >> Cheng Xu >> >> Cheng Xu (4): >> RDMA/erdma: Configure PAGE_SIZE to hardware >> RDMA/erdma: Allocate doorbell resources from hardware >> RDMA/erdma: Associate QPs/CQs with doorbells for authorization >> RDMA/erdma: Refactor the original doorbell allocation mechanism > > As a side note, there is no need to perform double not (!!...) when > assigning to bool variables. > Get it. I will address it in future patchset together with other cleaning up. Thanks, Cheng Xu