Cheng Xu
3b3dfd58ba
RDMA/erdma: Refactor the original doorbell allocation mechanism
...
The original doorbell allocation mechanism is complex and does not meet
the isolation requirement. So we introduce a new doorbell mechanism and the
original mechanism (only be used with CAP_SYS_RAWIO if hardware does not
support the new mechanism) needs to be kept as simple as possible for
compatibility.
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Link: https://lore.kernel.org/r/20230606055005.80729-5-chengyou@linux.alibaba.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2023-06-11 11:57:01 +03:00
Cheng Xu
7e9a1dada2
RDMA/erdma: Allocate doorbell resources from hardware
...
Each ucontext will try to allocate doorbell resources in the extended bar
space from hardware. For compatibility, we change nothing for the original
bar space, and it will be used only for applications with CAP_SYS_RAWIO
authority in the older HW/FW environments.
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Link: https://lore.kernel.org/r/20230606055005.80729-3-chengyou@linux.alibaba.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2023-06-11 11:57:00 +03:00
Cheng Xu
72769dba6d
RDMA/erdma: Eliminate unnecessary casting of EQ doorbells
...
Using void * to define EQ doorbell pointer can eliminate unnecessary
casting when performing assignment. Also rename *db_addr* to *db* for a
shorter name.
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Link: https://lore.kernel.org/r/20230322093319.84045-3-chengyou@linux.alibaba.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2023-03-22 13:10:46 +02:00
Cheng Xu
35765dccaf
RDMA/erdma: Add a workqueue for WRs reflushing
...
ERDMA driver use a workqueue for asynchronous reflush command posting.
Implement the lifecycle of this workqueue.
Link: https://lore.kernel.org/r/20221116023107.82835-2-chengyou@linux.alibaba.com
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-11-24 14:58:52 -04:00
Cheng Xu
b4d46c57d2
RDMA/erdma: Fix a typo in annotation
...
A non-ASCII character was wrongly put in a comment, use the ACSII version.
Fixes: bee85e0e31 ("RDMA/erdma: Add main include file")
Link: https://lore.kernel.org/r/20221124114933.77250-1-chengyou@linux.alibaba.com
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-11-24 14:49:18 -04:00
Cheng Xu
71c6925f28
RDMA/erdma: Report atomic capacity when hardware supports atomic feature
...
Introduce "capacity flags" field at where hardware put all zeros originally
in "query device" response. Using this field, hardware can report atomic
feature if supports.
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Link: https://lore.kernel.org/r/20221107021845.44598-3-chengyou@linux.alibaba.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2022-11-07 09:55:04 +02:00
Cheng Xu
9bdb9350f3
RDMA/erdma: Support dynamic mtu
...
Hardware now support jumbo frame for RDMA. So we introduce a new CMDQ
message to support mtu change notification.
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Link: https://lore.kernel.org/r/20220909093822.33868-5-chengyou@linux.alibaba.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2022-09-21 10:31:24 +03:00
Cheng Xu
93aea72cc5
RDMA/erdma: Remove redundant includes
...
Many of erdma's includes are redundant, because they are already included
indirectly by kernel headers or custom headers. So we remove all the
unnecessary direct-includes. Besides, add linux/pci.h to erdma.h because
it's also used in the file.
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Link: https://lore.kernel.org/r/20220909093822.33868-3-chengyou@linux.alibaba.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2022-09-20 14:27:51 +03:00
Cheng Xu
95f911d949
RDMA/erdma: Eliminate unnecessary casting for erdma_post_cmd_wait
...
erdma_post_cmd_wait does not use the 'u64 *req' input parameter directly.
So it is better to define it to 'void *req', and by this we can eliminate
the casting when calling erdma_post_cmd_wait.
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Link: https://lore.kernel.org/r/20220909093822.33868-2-chengyou@linux.alibaba.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2022-09-20 14:27:51 +03:00
Cheng Xu
bee85e0e31
RDMA/erdma: Add main include file
...
Add ERDMA driver main header file, defining internal used data structures
and operations. The defined data structures includes *cmdq*, which is used
as the communication channel between ERDMA driver and hardware.
Link: https://lore.kernel.org/r/20220727014927.76564-4-chengyou@linux.alibaba.com
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2022-07-27 15:54:39 -03:00