Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

RDMA/cxgb3: Set the max_mr_size device attribute correctly

cxgb3 only supports 4GB memory regions. The lustre RDMA code uses
this attribute and currently has to code around our bad setting.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by

Steve Wise and committed by
Roland Dreier
ccaf10d0 989a1780

+4 -1
+1
drivers/infiniband/hw/cxgb3/cxio_hal.h
··· 53 53 #define T3_MAX_PBL_SIZE 256 54 54 #define T3_MAX_RQ_SIZE 1024 55 55 #define T3_MAX_NUM_STAG (1<<15) 56 + #define T3_MAX_MR_SIZE 0x100000000ULL 56 57 57 58 #define T3_STAG_UNSET 0xffffffff 58 59
+1
drivers/infiniband/hw/cxgb3/iwch.c
··· 83 83 rnicp->attr.max_phys_buf_entries = T3_MAX_PBL_SIZE; 84 84 rnicp->attr.max_pds = T3_MAX_NUM_PD - 1; 85 85 rnicp->attr.mem_pgsizes_bitmask = 0x7FFF; /* 4KB-128MB */ 86 + rnicp->attr.max_mr_size = T3_MAX_MR_SIZE; 86 87 rnicp->attr.can_resize_wq = 0; 87 88 rnicp->attr.max_rdma_reads_per_qp = 8; 88 89 rnicp->attr.max_rdma_read_resources =
+1
drivers/infiniband/hw/cxgb3/iwch.h
··· 66 66 * size (4k)^i. Phys block list mode unsupported. 67 67 */ 68 68 u32 mem_pgsizes_bitmask; 69 + u64 max_mr_size; 69 70 u8 can_resize_wq; 70 71 71 72 /*
+1 -1
drivers/infiniband/hw/cxgb3/iwch_provider.c
··· 998 998 props->device_cap_flags = dev->device_cap_flags; 999 999 props->vendor_id = (u32)dev->rdev.rnic_info.pdev->vendor; 1000 1000 props->vendor_part_id = (u32)dev->rdev.rnic_info.pdev->device; 1001 - props->max_mr_size = ~0ull; 1001 + props->max_mr_size = dev->attr.max_mr_size; 1002 1002 props->max_qp = dev->attr.max_qps; 1003 1003 props->max_qp_wr = dev->attr.max_wrs; 1004 1004 props->max_sge = dev->attr.max_sge_per_wr;