• Sergey Gorenko's avatar
    IB/iser: Fix RNR errors · 39b169ea
    Sergey Gorenko authored
    Some users complain about RNR errors on the target, when heavy
    high-priority tasks run on the initiator. After the investigation, we
    found out that the receive WRs were exhausted, because the initiator could
    not post them on time.
    
    Receive work reqeusts are posted in chunks to reduce the number of hits to
    the HCA. The WRs are posted in the receive completion handler when the
    number of free receive buffers reaches the threshold. But on a high-loaded
    host, receive CQEs processing can be delayed and all receive WRs will be
    exhausted. In this case, the target will get an RNR error.
    
    To avoid this, we post receive WR, as soon as possible and not in a
    batch. This increases the number of hits to the HCA, but also the common
    implementation in most of Linux ULPs (e.g. NVMe-oF/RDMA). As a rule of
    thumb, performance improvements and heuristics are being added to the RDMA
    core layer or vendors low level drivers and it's about time to align iSER
    as well.
    
    Link: https://lore.kernel.org/r/20211215135721.3662-3-mgurtovoy@nvidia.comSigned-off-by: default avatarSergey Gorenko <sergeygo@nvidia.com>
    Signed-off-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
    Reviewed-by: default avatarIsrael Rukshin <israelr@nvidia.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
    39b169ea
iscsi_iser.h 18.1 KB