• Yonatan Cohen's avatar
    IB/rxe: Fix duplicate atomic request handling · 90894887
    Yonatan Cohen authored
    When handling ack for atomic opcodes like "fetch&add"
    or "cmp&swp", the method send_atomic_ack() saves the ack
    before sending it, in case it gets lost and never reach the
    requester. In which case the method duplicate_request()
    will need to find it using the duplicated request.psn.
    But send_atomic_ack() used a wrong psn value and thus
    the above ack was never found.
    This fix uses the ack.psn to locate the ack in case
    its needed.
    This fix also copies the ack packet to the skb's control buffer
    since duplicate_request() will need it when calling rxe_xmit_packet()
    
    Fixes: 8700e3e7 ("Soft RoCE driver")
    Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
    Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    90894887
rxe_resp.c 31.7 KB