RDMA/nes: Correct fast memory registration implementation
Replace alloc_fmr, unmap_fmr, dealloc_fmr and map_phys_fmr with alloc_fast_reg_mr, alloc_fast_reg_page_list, free_fast_reg_page_list. Signed-off-by: Chien Tung <chien.tin.tung@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:

committed by
Roland Dreier

parent
649fe4aeab
commit
e293a26fe9
@@ -546,11 +546,23 @@ enum nes_iwarp_sq_fmr_wqe_word_idx {
|
||||
NES_IWARP_SQ_FMR_WQE_PBL_LENGTH_IDX = 14,
|
||||
};
|
||||
|
||||
enum nes_iwarp_sq_fmr_opcodes {
|
||||
NES_IWARP_SQ_FMR_WQE_ZERO_BASED = (1<<6),
|
||||
NES_IWARP_SQ_FMR_WQE_PAGE_SIZE_4K = (0<<7),
|
||||
NES_IWARP_SQ_FMR_WQE_PAGE_SIZE_2M = (1<<7),
|
||||
NES_IWARP_SQ_FMR_WQE_RIGHTS_ENABLE_LOCAL_READ = (1<<16),
|
||||
NES_IWARP_SQ_FMR_WQE_RIGHTS_ENABLE_LOCAL_WRITE = (1<<17),
|
||||
NES_IWARP_SQ_FMR_WQE_RIGHTS_ENABLE_REMOTE_READ = (1<<18),
|
||||
NES_IWARP_SQ_FMR_WQE_RIGHTS_ENABLE_REMOTE_WRITE = (1<<19),
|
||||
NES_IWARP_SQ_FMR_WQE_RIGHTS_ENABLE_WINDOW_BIND = (1<<20),
|
||||
};
|
||||
|
||||
#define NES_IWARP_SQ_FMR_WQE_MR_LENGTH_HIGH_MASK 0xFF;
|
||||
|
||||
enum nes_iwarp_sq_locinv_wqe_word_idx {
|
||||
NES_IWARP_SQ_LOCINV_WQE_INV_STAG_IDX = 6,
|
||||
};
|
||||
|
||||
|
||||
enum nes_iwarp_rq_wqe_word_idx {
|
||||
NES_IWARP_RQ_WQE_TOTAL_PAYLOAD_IDX = 1,
|
||||
NES_IWARP_RQ_WQE_COMP_CTX_LOW_IDX = 2,
|
||||
@@ -1153,6 +1165,19 @@ struct nes_pbl {
|
||||
/* TODO: need to add list for two level tables */
|
||||
};
|
||||
|
||||
#define NES_4K_PBL_CHUNK_SIZE 4096
|
||||
|
||||
struct nes_fast_mr_wqe_pbl {
|
||||
u64 *kva;
|
||||
dma_addr_t paddr;
|
||||
};
|
||||
|
||||
struct nes_ib_fast_reg_page_list {
|
||||
struct ib_fast_reg_page_list ibfrpl;
|
||||
struct nes_fast_mr_wqe_pbl nes_wqe_pbl;
|
||||
u64 pbl;
|
||||
};
|
||||
|
||||
struct nes_listener {
|
||||
struct work_struct work;
|
||||
struct workqueue_struct *wq;
|
||||
|
Reference in New Issue
Block a user