]> 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)
commita9331e73ad67db282a057f72997da4ba536c62df
tree0c02e80de95207f0659bdfe57cc526e0a1cd3dea
parent1dcceb511e2a5e683f75f7a308a2d445a9b8732b
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: c4397c211d7d ("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