IB/srpt: Reduce QP buffer size
[cascardo/linux.git] / drivers / infiniband / ulp / srpt / ib_srpt.c
index 2843f1a..4a41556 100644 (file)
@@ -254,8 +254,8 @@ static void srpt_get_class_port_info(struct ib_dm_mad *mad)
        memset(cif, 0, sizeof(*cif));
        cif->base_version = 1;
        cif->class_version = 1;
-       cif->resp_time_value = 20;
 
+       ib_set_cpi_resp_time(cif, 20);
        mad->mad_hdr.status = 0;
 }
 
@@ -1638,8 +1638,7 @@ retry:
         */
        qp_init->cap.max_send_wr = srp_sq_size / 2;
        qp_init->cap.max_rdma_ctxs = srp_sq_size / 2;
-       qp_init->cap.max_send_sge = max(sdev->device->attrs.max_sge_rd,
-                                       sdev->device->attrs.max_sge);
+       qp_init->cap.max_send_sge = SRPT_DEF_SG_PER_WQE;
        qp_init->port_num = ch->sport->port;
 
        ch->qp = ib_create_qp(sdev->pd, qp_init);
@@ -1767,14 +1766,6 @@ static void __srpt_close_all_ch(struct srpt_device *sdev)
        }
 }
 
-/**
- * srpt_shutdown_session() - Whether or not a session may be shut down.
- */
-static int srpt_shutdown_session(struct se_session *se_sess)
-{
-       return 1;
-}
-
 static void srpt_free_ch(struct kref *kref)
 {
        struct srpt_rdma_ch *ch = container_of(kref, struct srpt_rdma_ch, kref);
@@ -3064,7 +3055,6 @@ static const struct target_core_fabric_ops srpt_template = {
        .tpg_get_inst_index             = srpt_tpg_get_inst_index,
        .release_cmd                    = srpt_release_cmd,
        .check_stop_free                = srpt_check_stop_free,
-       .shutdown_session               = srpt_shutdown_session,
        .close_session                  = srpt_close_session,
        .sess_get_index                 = srpt_sess_get_index,
        .sess_get_initiator_sid         = NULL,