Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccaf10d0 authored by Steve Wise's avatar Steve Wise Committed by Roland Dreier
Browse files

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: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 989a1780
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -53,6 +53,7 @@
#define T3_MAX_PBL_SIZE 256
#define T3_MAX_PBL_SIZE 256
#define T3_MAX_RQ_SIZE 1024
#define T3_MAX_RQ_SIZE 1024
#define T3_MAX_NUM_STAG (1<<15)
#define T3_MAX_NUM_STAG (1<<15)
#define T3_MAX_MR_SIZE 0x100000000ULL


#define T3_STAG_UNSET 0xffffffff
#define T3_STAG_UNSET 0xffffffff


+1 −0
Original line number Original line Diff line number Diff line
@@ -83,6 +83,7 @@ static void rnic_init(struct iwch_dev *rnicp)
	rnicp->attr.max_phys_buf_entries = T3_MAX_PBL_SIZE;
	rnicp->attr.max_phys_buf_entries = T3_MAX_PBL_SIZE;
	rnicp->attr.max_pds = T3_MAX_NUM_PD - 1;
	rnicp->attr.max_pds = T3_MAX_NUM_PD - 1;
	rnicp->attr.mem_pgsizes_bitmask = 0x7FFF;	/* 4KB-128MB */
	rnicp->attr.mem_pgsizes_bitmask = 0x7FFF;	/* 4KB-128MB */
	rnicp->attr.max_mr_size = T3_MAX_MR_SIZE;
	rnicp->attr.can_resize_wq = 0;
	rnicp->attr.can_resize_wq = 0;
	rnicp->attr.max_rdma_reads_per_qp = 8;
	rnicp->attr.max_rdma_reads_per_qp = 8;
	rnicp->attr.max_rdma_read_resources =
	rnicp->attr.max_rdma_read_resources =
+1 −0
Original line number Original line Diff line number Diff line
@@ -66,6 +66,7 @@ struct iwch_rnic_attributes {
	 * size (4k)^i.  Phys block list mode unsupported.
	 * size (4k)^i.  Phys block list mode unsupported.
	 */
	 */
	u32 mem_pgsizes_bitmask;
	u32 mem_pgsizes_bitmask;
	u64 max_mr_size;
	u8 can_resize_wq;
	u8 can_resize_wq;


	/*
	/*
+1 −1
Original line number Original line Diff line number Diff line
@@ -998,7 +998,7 @@ static int iwch_query_device(struct ib_device *ibdev,
	props->device_cap_flags = dev->device_cap_flags;
	props->device_cap_flags = dev->device_cap_flags;
	props->vendor_id = (u32)dev->rdev.rnic_info.pdev->vendor;
	props->vendor_id = (u32)dev->rdev.rnic_info.pdev->vendor;
	props->vendor_part_id = (u32)dev->rdev.rnic_info.pdev->device;
	props->vendor_part_id = (u32)dev->rdev.rnic_info.pdev->device;
	props->max_mr_size = ~0ull;
	props->max_mr_size = dev->attr.max_mr_size;
	props->max_qp = dev->attr.max_qps;
	props->max_qp = dev->attr.max_qps;
	props->max_qp_wr = dev->attr.max_wrs;
	props->max_qp_wr = dev->attr.max_wrs;
	props->max_sge = dev->attr.max_sge_per_wr;
	props->max_sge = dev->attr.max_sge_per_wr;