RDMA/qedr: Add doorbell overflow recovery support

Use the doorbell recovery mechanism to register rdma related doorbells
that will be restored in case there is a doorbell overflow attention.

Link: https://lore.kernel.org/r/20191030094417.16866-8-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Michal Kalderon
2019-10-30 11:44:16 +02:00
committed by Jason Gunthorpe
parent 4c6bb02d59
commit 97f6125092
3 changed files with 300 additions and 50 deletions

View File

@@ -38,6 +38,15 @@
#define QEDR_ABI_VERSION (8)
/* user kernel communication data structures. */
enum qedr_alloc_ucontext_flags {
QEDR_ALLOC_UCTX_RESERVED = 1 << 0,
QEDR_ALLOC_UCTX_DB_REC = 1 << 1
};
struct qedr_alloc_ucontext_req {
__u32 context_flags;
__u32 reserved;
};
struct qedr_alloc_ucontext_resp {
__aligned_u64 db_pa;
@@ -74,6 +83,7 @@ struct qedr_create_cq_uresp {
__u32 db_offset;
__u16 icid;
__u16 reserved;
__aligned_u64 db_rec_addr;
};
struct qedr_create_qp_ureq {
@@ -109,6 +119,13 @@ struct qedr_create_qp_uresp {
__u32 rq_db2_offset;
__u32 reserved;
/* address of SQ doorbell recovery user entry */
__aligned_u64 sq_db_rec_addr;
/* address of RQ doorbell recovery user entry */
__aligned_u64 rq_db_rec_addr;
};
struct qedr_create_srq_ureq {
@@ -128,4 +145,12 @@ struct qedr_create_srq_uresp {
__u32 reserved1;
};
/* doorbell recovery entry allocated and populated by userspace doorbelling
* entities and mapped to kernel. Kernel uses this to register doorbell
* information with doorbell drop recovery mechanism.
*/
struct qedr_user_db_rec {
__aligned_u64 db_data; /* doorbell data */
};
#endif /* __QEDR_USER_H__ */