[ofa-general] [PATCH 2/3][v1.2] dapl: adjust max_rdma_read_iov to 1 for query on iWARP devices

Arlin Davis arlin.r.davis at intel.com
Fri Oct 3 11:04:05 PDT 2008


iWarp spec allows only one iov on rdma reads

Signed-off-by: Arlin Davis <ardavis at ichips.intel.com>
---
 dapl/openib_cma/dapl_ib_util.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/dapl/openib_cma/dapl_ib_util.c b/dapl/openib_cma/dapl_ib_util.c
index afb7463..598afab 100755
--- a/dapl/openib_cma/dapl_ib_util.c
+++ b/dapl/openib_cma/dapl_ib_util.c
@@ -506,7 +506,14 @@ DAT_RETURN dapls_ib_query_hca(IN DAPL_HCA *hca_ptr,
 		ia_attr->transport_attr           = NULL;
 		ia_attr->num_vendor_attr          = 0;
 		ia_attr->vendor_attr              = NULL;
-		ia_attr->max_iov_segments_per_rdma_read = dev_attr.max_sge;
+		/* iWARP spec. - 1 sge for RDMA reads */
+		if (hca_ptr->ib_hca_handle->device->transport_type
+							== IBV_TRANSPORT_IWARP)
+			ia_attr->max_iov_segments_per_rdma_read = 1;
+		else
+			ia_attr->max_iov_segments_per_rdma_read = 
+							dev_attr.max_sge;
+
 		ia_attr->max_iov_segments_per_rdma_write = dev_attr.max_sge;
 		/* save rd_atom for peer validation during connect requests */
 		hca_ptr->ib_trans.max_rdma_rd_in  = dev_attr.max_qp_rd_atom;
@@ -538,7 +545,13 @@ DAT_RETURN dapls_ib_query_hca(IN DAPL_HCA *hca_ptr,
 		ep_attr->max_request_iov  = dev_attr.max_sge;
 		ep_attr->max_rdma_read_in = dev_attr.max_qp_rd_atom;
 		ep_attr->max_rdma_read_out= dev_attr.max_qp_init_rd_atom;
-		ep_attr->max_rdma_read_iov= dev_attr.max_sge;
+		/* iWARP spec. - 1 sge for RDMA reads */
+		if (hca_ptr->ib_hca_handle->device->transport_type
+							== IBV_TRANSPORT_IWARP)
+			ep_attr->max_rdma_read_iov = 1;
+		else
+			ep_attr->max_rdma_read_iov = dev_attr.max_sge;
+
 		ep_attr->max_rdma_write_iov= dev_attr.max_sge;
 		dapl_log(DAPL_DBG_TYPE_UTIL,
 			 "dapl_query_hca: MAX msg %llu dto %d iov %d"
-- 
1.5.2.5





More information about the general mailing list