lkml.org 
[lkml]   [2016]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.19.y-ckt 058/160] IB/srp: Fix possible send queue overflow
    Date
    3.19.8-ckt13 -stable review patch.  If anyone has any objections, please let me know.

    ---8<------------------------------------------------------------

    From: Sagi Grimberg <sagig@mellanox.com>

    commit 09c0c0bea500a9ad362589990ee316c9b2482f44 upstream.

    When using work request based memory registration (fast_reg)
    we must reserve SQ entries for registration and invalidation
    in addition to send operations. Each IO consumes 3 SQ entries
    (registration, send, invalidation) so we need to allocate 3x
    larger send-queue instead of 2x.

    Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    drivers/infiniband/ulp/srp/ib_srp.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
    index 3dace1d..2bfa995 100644
    --- a/drivers/infiniband/ulp/srp/ib_srp.c
    +++ b/drivers/infiniband/ulp/srp/ib_srp.c
    @@ -496,7 +496,7 @@ static int srp_create_ch_ib(struct srp_rdma_ch *ch)
    struct ib_qp *qp;
    struct ib_fmr_pool *fmr_pool = NULL;
    struct srp_fr_pool *fr_pool = NULL;
    - const int m = 1 + dev->use_fast_reg;
    + const int m = dev->use_fast_reg ? 3 : 1;
    int ret;

    init_attr = kzalloc(sizeof *init_attr, GFP_KERNEL);
    --
    1.9.1

    \
     
     \ /
      Last update: 2016-01-20 03:01    [W:4.168 / U:1.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site