]> git.baikalelectronics.ru Git - kernel.git/commit
IB/rxe: Fix duplicate atomic request handling
authorYonatan Cohen <yonatanc@mellanox.com>
Wed, 7 Sep 2016 11:04:05 +0000 (14:04 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 16 Sep 2016 18:14:08 +0000 (14:14 -0400)
commit84e5cafe19adf7fa039a2ea9569a5cc7a68e9252
tree0c02e80de95207f0659bdfe57cc526e0a1cd3dea
parentda0f160f1ae5722e3c4420abef8f3d6d74c4d5ef
IB/rxe: Fix duplicate atomic request handling

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: 5deaf88696f1 ("Soft RoCE driver")
Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_resp.c