]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
dapl: adjust max_rdma_read_iov to 1 for query on iWARP devices
authorArlin Davis <arlin.r.davis@intel.com>
Fri, 3 Oct 2008 12:30:29 +0000 (05:30 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Fri, 3 Oct 2008 12:30:29 +0000 (05:30 -0700)
iWarp spec allows only one iov on rdma reads

Signed-off-by: Arlin Davis <ardavis@ichips.intel.com>
dapl/openib_cma/dapl_ib_util.c

index afb7463faa4e68275cbe259e36570d41053bb21c..598afab05d457f71bd34f2ceb7b2cf7f0e13652a 100755 (executable)
@@ -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"