]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: Take into account HW inline capabilities
authorAmir Vadai <amirv@mellanox.co.il>
Sun, 14 Nov 2010 12:57:15 +0000 (14:57 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:34 +0000 (05:05 -0700)
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_cma.c

index 1b7b18cafb348acf5a2f10336d32bebc05ecf9e0..02e9c2a68dae7d358230ea9b49b0c8187548727f 100644 (file)
@@ -88,8 +88,6 @@ static int sdp_init_qp(struct sock *sk, struct rdma_cm_id *id)
 
        sdp_dbg(sk, "%s\n", __func__);
 
-       sdp_sk(sk)->inline_thresh = sdp_inline_thresh;
-
        sdp_sk(sk)->max_sge = sdp_get_max_dev_sge(device);
        sdp_dbg(sk, "Max sges: %d\n", sdp_sk(sk)->max_sge);
 
@@ -126,6 +124,7 @@ static int sdp_init_qp(struct sock *sk, struct rdma_cm_id *id)
        sdp_sk(sk)->ib_device = device;
        sdp_sk(sk)->qp_active = 1;
        sdp_sk(sk)->context.device = device;
+       sdp_sk(sk)->inline_thresh = qp_init_attr.cap.max_inline_data;
 
        sdp_dbg(sk, "%s done\n", __func__);
        return 0;
@@ -184,6 +183,7 @@ static int sdp_connect_handler(struct sock *sk, struct rdma_cm_id *id,
                bh_unlock_sock(child);
                up_read(&device_removal_lock);
                sdp_sk(child)->destructed_already = 1;
+               sdp_ssk_hist_close(child);
                sk_free(child);
                return rc;
        }