Commit 97f61250 authored by Michal Kalderon's avatar Michal Kalderon Committed by Jason Gunthorpe

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.comSigned-off-by: default avatarAriel Elior <ariel.elior@marvell.com>
Signed-off-by: default avatarMichal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 4c6bb02d
......@@ -235,6 +235,7 @@ struct qedr_ucontext {
u64 dpi_phys_addr;
u32 dpi_size;
u16 dpi;
bool db_rec;
};
union db_prod64 {
......@@ -262,6 +263,11 @@ struct qedr_userq {
struct qedr_pbl *pbl_tbl;
u64 buf_addr;
size_t buf_len;
/* doorbell recovery */
void __iomem *db_addr;
struct qedr_user_db_rec *db_rec_data;
struct rdma_user_mmap_entry *db_mmap_entry;
};
struct qedr_cq {
......@@ -482,7 +488,10 @@ struct qedr_mr {
struct qedr_user_mmap_entry {
struct rdma_user_mmap_entry rdma_entry;
struct qedr_dev *dev;
u64 io_address;
union {
u64 io_address;
void *address;
};
size_t length;
u16 dpi;
u8 mmap_flag;
......
This diff is collapsed.
......@@ -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__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment